All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: comedi: introduce 'comedi_board' helper function
@ 2012-04-27 21:10 H Hartley Sweeten
  0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2012-04-27 21:10 UTC (permalink / raw)
  To: Linux Kernel; +Cc: devel, abbotti, fmhess, gregkh

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>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---

V2: change name

With this helper removing all the 'this_board' defines in the drivers
will be easier (and cleaner).

diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 300fd84..02e4ae0 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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-27 21:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27 21:10 [PATCH v2] staging: comedi: introduce 'comedi_board' helper function H Hartley Sweeten

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.