diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-04-18 21:31:29 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-19 18:19:52 (GMT) |
commit | 316f97f169084c9a984d989d88ddce4eff60d749 (patch) | |
tree | a744d6519a64966de565db77beade3599ef399aa /drivers/staging/comedi/comedidev.h | |
parent | 3a8d2ccdcff80c2a0aa2367cc4855c7f57e13a06 (diff) | |
download | linux-fsl-qoriq-316f97f169084c9a984d989d88ddce4eff60d749.tar.xz |
staging: comedi: drivers: introduce comedi_legacy_detach()
This function is intended to be used by the comedi legacy (ISA) drivers
either directly as the (*detach) function or as a helper in the drivers
private (*detach) function.
Modify the comedi_request_region() helper so that it stores the 'len' of
the region as well as the 'start' after the region has been successfuly
allocated by request_region() in __comedi_request_region(). This region
will then be automatically released detach of the driver by the
comedi_legacy_detach() helper.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedidev.h')
-rw-r--r-- | drivers/staging/comedi/comedidev.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index ce509d0..cdd4720 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -216,6 +216,7 @@ struct comedi_device { /* dumb */ unsigned long iobase; + unsigned long iolen; unsigned int irq; struct comedi_subdevice *read_subdev; @@ -354,6 +355,7 @@ int __comedi_request_region(struct comedi_device *, unsigned long start, unsigned long len); int comedi_request_region(struct comedi_device *, unsigned long start, unsigned long len); +void comedi_legacy_detach(struct comedi_device *); int comedi_auto_config(struct device *, struct comedi_driver *, unsigned long context); |