]> git.openfabrics.org - ~emulex/infiniband.git/commit
staging: comedi: change comedi_read/write_subdevice() parameters
authorIan Abbott <abbotti@mev.co.uk>
Thu, 4 Apr 2013 13:59:10 +0000 (14:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:33:20 +0000 (14:33 -0700)
commitda56fdc6cd6ebefb597bbf9f1b30c2b0a39c9f56
treec02eae5e4fdf80e5216547b361a60cdddb0d1745
parentc88db46908490f8ae3e3bca3533fbe6250762385
staging: comedi: change comedi_read/write_subdevice() parameters

`comedi_read_subdevice()` and `comedi_write_subdevice()` currently take
a single parameter pointing to a `struct comedi_file_info`.  I'm trying
to get rid of `struct comedi_file_info` so as part of that plan,
`comedi_read_subdevice()` and `comedi_write_subdevice()` need to change.
Change them to take two parameters: a pointer to a `struct
comedi_device` and a minor device number.  If the minor device number is
a "board" minor device number (`minor < COMEDI_NUM_BOARD_MINORS`) we'll
always return the default read or write subdevice.  If the minor device
number if a "subdevice" minor device number a different read or write
subdevice may be returned.  In that case, use the subdevice minor device
number to look up the information about whether the default read or
write subdevice needs to be overridden.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c