summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/comedidev.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-09 23:05:54 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 19:47:35 (GMT)
commitf375ac5f197d32aeffe5436e5864525cc14ce44a (patch)
treeb88e0220afd6049b76f2a403109c5bb53fd667ba /drivers/staging/comedi/comedidev.h
parentaa7a82b9f941f1e299bf9b26dcd8bb76ecce3c8f (diff)
downloadlinux-fsl-qoriq-f375ac5f197d32aeffe5436e5864525cc14ce44a.tar.xz
staging: comedi: drivers: introduce comedi_request_region()
Introduce a helper function to handle the request_region() for legacy comedi drivers. As pointed out by Ian Abbott, legacy devices are configured manually with the "comedi_config" program. The error messages are useful diagnostics when trying to attach to these boards. Providing a helper function allows consolidating the error messages in the drivers and providing a consistent format for the errors. This helper also sets the dev->iobase automatically for the driver if the request_region() is successful. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedidev.h')
-rw-r--r--drivers/staging/comedi/comedidev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 060d450..77ea996 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -348,6 +348,9 @@ void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset,
int comedi_alloc_subdevices(struct comedi_device *, int);
+int comedi_request_region(struct comedi_device *,
+ unsigned long start, unsigned long len);
+
int comedi_auto_config(struct device *, struct comedi_driver *,
unsigned long context);
void comedi_auto_unconfig(struct device *);