diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-02-05 18:15:20 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-05 18:16:19 -0800 |
commit | 573a964882065f9b2cb71db8a225ba067b4b5b7a (patch) | |
tree | f8cb9692a7d2369323d0b81c64d032242142c888 /drivers | |
parent | 66dbc7b1b00499285793143b44b979e26141204d (diff) |
staging: comedi: ni_daq_dio24: use comedi_pcmcia_{enable,disable}
Use the comedi_pcmcia_{enable,disable} helpers to enable/disable
the PCMCIA device.
This driver does not use interrupts and is not an audio device, remove
CONF_ENABLE_IRQ and CONF_AUTO_AUDIO from the link->config_flags.
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')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_daq_dio24.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index 53fd4d0f88df..edfbfb315122 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -45,15 +45,6 @@ the PCMCIA interface. #include "8255.h" -static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev, - void *priv_data) -{ - if (p_dev->config_index == 0) - return -EINVAL; - - return pcmcia_request_io(p_dev); -} - static int dio24_auto_attach(struct comedi_device *dev, unsigned long context) { @@ -63,15 +54,8 @@ static int dio24_auto_attach(struct comedi_device *dev, dev->board_name = dev->driver->driver_name; - link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_AUDIO | - CONF_AUTO_SET_IO; - - ret = pcmcia_loop_config(link, dio24_pcmcia_config_loop, NULL); - if (ret) - return ret; - - ret = pcmcia_enable_device(link); - if (ret) + link->config_flags |= CONF_AUTO_SET_IO; + ret = comedi_pcmcia_enable(dev); return ret; dev->iobase = link->resource[0]->start; @@ -90,12 +74,9 @@ static int dio24_auto_attach(struct comedi_device *dev, static void dio24_detach(struct comedi_device *dev) { - struct pcmcia_device *link = comedi_to_pcmcia_dev(dev); - if (dev->subdevices) subdev_8255_cleanup(dev, &dev->subdevices[0]); - if (dev->iobase) - pcmcia_disable_device(link); + comedi_pcmcia_disable(dev); } static struct comedi_driver driver_dio24 = { |