diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-01-30 16:46:39 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-03 19:27:37 -0600 |
commit | 6746dc6340ea90e04f51825042d4e5e47472b951 (patch) | |
tree | a38141593ed29bad280add65746b54d50e5d0046 /drivers/staging/comedi/drivers/ni_daq_dio24.c | |
parent | 5316ec545372cc991f9c48482db2febd7a6091ea (diff) |
staging: comedi: ni_daq_dio24: cleanup dio24_detach
Simplify the call to subdev_8255_cleanup() to remove the
need for a local variable.
This driver only attaches to pcmcia devices so the test for
thisboard != pcmcia_bustype will always fail. Remove the test
and the unreachable release_region().
This driver also never does a request_irq() so remove the
free_irq().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/ni_daq_dio24.c')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_daq_dio24.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index 123c4be98295..47268ddafbb1 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -126,18 +126,9 @@ static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it) static void dio24_detach(struct comedi_device *dev) { - const struct dio24_board_struct *thisboard = comedi_board(dev); - struct comedi_subdevice *s; - - if (dev->subdevices) { - s = &dev->subdevices[0]; - subdev_8255_cleanup(dev, s); - } - if (thisboard->bustype != pcmcia_bustype && dev->iobase) - release_region(dev->iobase, DIO24_SIZE); - if (dev->irq) - free_irq(dev->irq, dev); -}; + if (dev->subdevices) + subdev_8255_cleanup(dev, &dev->subdevices[0]); +} static struct comedi_driver driver_dio24 = { .driver_name = "ni_daq_dio24", |