From: H Hartley Sweeten Date: Fri, 27 Apr 2012 21:10:15 +0000 (-0700) Subject: staging: comedi: introduce 'comedi_board' helper function X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=37859f8893c00fe4baa95f61ba560b9990f59484;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- 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;