]> git.karo-electronics.de Git - linux-beck.git/commit
staging: comedi: add a kref to comedi device
authorIan Abbott <abbotti@mev.co.uk>
Fri, 8 Nov 2013 15:03:32 +0000 (15:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2013 00:16:44 +0000 (16:16 -0800)
commit5b13ed94a7d24fdc8abbac81e7e4d30ab22c6540
tree0bfade11593603377f28228a2db2ed13cdaa7b7a
parent45c2bc557ca333a2115bb9f812b026b482cca5fa
staging: comedi: add a kref to comedi device

Add a `struct kref refcount` member to `struct comedi_device` to allow
safe destruction of the comedi device.  Only free the comedi device via
the 'release' callback `kref_put()`.  Currently, nothing calls
`kref_put()`, so the safe destruction is ineffective, but this will be
addressed by later patches.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c
drivers/staging/comedi/comedidev.h