staging: comedi: introduce 'comedi_board' helper function
authorH Hartley Sweeten <hartleys@visionengravers.com>
Fri, 27 Apr 2012 21:10:15 +0000 (14:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Apr 2012 01:37:49 +0000 (21:37 -0400)
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 <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedidev.h

index 300fd8400a4b2813c357d380543b75bb6c779a9f..02e4ae0643a7c60fd6f55d490b5799def57b1442 100644 (file)
@@ -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;