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/amplc_pc263.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/amplc_pc263.c')
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_pc263.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pc263.c b/drivers/staging/comedi/drivers/amplc_pc263.c index 1ffe3799179..94a752d852b 100644 --- a/drivers/staging/comedi/drivers/amplc_pc263.c +++ b/drivers/staging/comedi/drivers/amplc_pc263.c @@ -104,17 +104,11 @@ static int pc263_attach(struct comedi_device *dev, struct comedi_devconfig *it) return 0; } -static void pc263_detach(struct comedi_device *dev) -{ - if (dev->iobase) - release_region(dev->iobase, PC263_IO_SIZE); -} - static struct comedi_driver amplc_pc263_driver = { .driver_name = PC263_DRIVER_NAME, .module = THIS_MODULE, .attach = pc263_attach, - .detach = pc263_detach, + .detach = comedi_legacy_detach, .board_name = &pc263_boards[0].name, .offset = sizeof(struct pc263_board), .num_names = ARRAY_SIZE(pc263_boards), |