aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <[email protected]>2012-04-27 14:10:15 -0700
committerGreg Kroah-Hartman <[email protected]>2012-04-29 21:37:49 -0400
commit37859f8893c00fe4baa95f61ba560b9990f59484 (patch)
treec9cfb254f1bf12c6ae8bf2dc8e33e822edbbd7f6
parentd9a861d55e0cf60829956d7c6e18b7de0b02ab92 (diff)
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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/comedi/comedidev.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 300fd8400a4b..02e4ae0643a7 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -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;