diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-04-18 14:33:22 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-19 11:19:53 -0700 |
commit | 21208519d42404150fef42283a20192ffe08b0af (patch) | |
tree | 71ab649897cdcf32ebb7cc9f554430908feea308 /drivers/staging/comedi/drivers/adq12b.c | |
parent | e608796ab624049419e987be32f81ab08486c7ba (diff) |
staging: comedi: drivers: use comedi_legacy_detach() in simple drivers
Use the new comedi_legacy_detach() helper in the (*detach) to release
the I/O region requested by these drivers.
Since the (*detach) for these drivers only releases the region, remove
the private (*detach) functions and use comedi_legacy_detach() directly
for the (*detach).
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/drivers/adq12b.c')
-rw-r--r-- | drivers/staging/comedi/drivers/adq12b.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index 44e8f0e2d60..71142e36e7f 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c @@ -281,17 +281,11 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) return 0; } -static void adq12b_detach(struct comedi_device *dev) -{ - if (dev->iobase) - release_region(dev->iobase, ADQ12B_SIZE); -} - static struct comedi_driver adq12b_driver = { .driver_name = "adq12b", .module = THIS_MODULE, .attach = adq12b_attach, - .detach = adq12b_detach, + .detach = comedi_legacy_detach, }; module_comedi_driver(adq12b_driver); |