]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: comedi: use file->private_data in file operations
authorIan Abbott <abbotti@mev.co.uk>
Fri, 8 Nov 2013 15:03:40 +0000 (15:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2013 00:16:45 +0000 (16:16 -0800)
commite5d670dcb7b336fb0c2fcff29ce87892e492e6b3
tree1328f3ad28152c4ff4845aec98dfd590dfa041df
parent69e2387f3bfd408c7fb6c0d14b83d792f67ed638
staging: comedi: use file->private_data in file operations

Since the `struct comedi_device` should now be protected from being
freed while an open file object is using it, use the `private_data`
member of the `struct file` to point to it.  Set it in `comedi_open()`
and use it in the other file operation handlers instead of calling
`comedi_dev_from_minor()` and checking the result.

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