summaryrefslogtreecommitdiffstats
path: root/drivers/target/loopback/tcm_loop.h
diff options
context:
space:
mode:
authorIan Abbott2013-04-04 15:59:15 +0200
committerGreg Kroah-Hartman2013-04-05 23:33:21 +0200
commitbd5b4173d50af86798d98b147321a92cf3a0a8ec (patch)
tree199e0ed7aa00e4b193816a47789900ad70ee2ea8 /drivers/target/loopback/tcm_loop.h
parentstaging: comedi: remove comedi_file_info_from_board_minor() (diff)
downloadkernel-qcow2-linux-bd5b4173d50af86798d98b147321a92cf3a0a8ec.tar.gz
kernel-qcow2-linux-bd5b4173d50af86798d98b147321a92cf3a0a8ec.tar.xz
kernel-qcow2-linux-bd5b4173d50af86798d98b147321a92cf3a0a8ec.zip
staging: comedi: simplify comedi_subdevice_minor_table[]
`comedi_alloc_subdevice_minor()` allocates and initializes a `struct comedi_file_info` and assigns a subdevice minor device number (if there are any available), storing a pointer to the allocated `struct comedi_file_info` in `comedi_subdevice_minor_table[i]` where `i` is the array index corresponding to the subdevice minor device number (indexed by subdevice minor device number minus `COMEDI_NUM_BOARD_MINORS`). The information stored in the `struct comedi_file_info` can be derived from the subdevice structure (`struct comedi_subdevice`) itself, so the `struct comedi_file_info` is superfluous. Change `comedi_subdevice_minor_table[]` to hold pointers to the actual `struct comedi_subdevice`'s. `comedi_alloc_subdevice_minor()` no longer needs to allocate a `struct comedi_file_info` and `comedi_free_subdevice_info()` no longer has a `struct comedi_file_info` to free. Replace `comedi_file_info_from_minor()` with `comedi_subdevice_from_minor()`, returning a (possibly NULL) pointer to a `struct comedi_subdevice` from the table. This has knock-on effects for `comedi_dev_from_subdevice_minor()`, `comedi_read_subdevice()` and `comedi_write_subdevice()`. In particular, `comedi_read_subdevice()` and `comedi_write_subdevice()` now need to check the subdevice flags to see if the determine whether to override the comedi device's default read/write subdevice. 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>
Diffstat (limited to 'drivers/target/loopback/tcm_loop.h')
0 files changed, 0 insertions, 0 deletions