From 37859f8893c00fe4baa95f61ba560b9990f59484 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 27 Apr 2012 14:10:15 -0700 Subject: [PATCH] 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 Cc: Ian Abbott Cc: Mori Hess Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedidev.h | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.20.1