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>
Showing
Please register or sign in to comment