staging: comedi: introduce 'comedi_board' helper function
PATCH v2 1/1 staging: comedi: introduce 'comedi_board' helper function
This helper function is used to fetch the comedi_device board_ptr which is used during the attach to pass board specific information to the comedi drivers.
Signed-off-by H Hartley Sweeten <[email protected]>
Cc Ian Abbott <[email protected]>
Cc Mori Hess <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
V2: change name
With this helper removing all the 'this_board' defines in the drivers will be easier (and cleaner).
drivers/staging/comedi/comedidev.h +5 -0
@@ -235,6 +235,11 @@ struct comedi_device {void (*close) (struct comedi_device *dev); }; +static inline const void *comedi_board (struct comedi_device *dev) +{ +return dev->board_ptr; +} +struct comedi_device_file_info {struct comedi_device *device;struct comedi_subdevice *read_subdevice;