diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-02-04 21:21:56 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-04 22:47:19 (GMT) |
commit | 7dc99109f53535f888bc13ea2aad3632acdda475 (patch) | |
tree | e542d600f2a2bc6665e5dae57ee2375ed354dd84 /drivers | |
parent | 95f932cea3b59003fc019acbf32fadb53a529778 (diff) | |
download | linux-fsl-qoriq-7dc99109f53535f888bc13ea2aad3632acdda475.tar.xz |
staging: comedi: ni_daq_700: 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_700.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index e537b8f..0fe2888 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@ -195,15 +195,6 @@ static void daq700_ai_config(struct comedi_device *dev, inw(iobase + ADFIFO_R); /* read 16bit junk from FIFO to clear */ } -static int daq700_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 daq700_auto_attach(struct comedi_device *dev, unsigned long context) { @@ -213,14 +204,8 @@ static int daq700_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, daq700_pcmcia_config_loop, NULL); - if (ret) - return ret; - - ret = pcmcia_enable_device(link); + link->config_flags |= CONF_AUTO_SET_IO; + ret = comedi_pcmcia_enable(dev); if (ret) return ret; dev->iobase = link->resource[0]->start; @@ -262,10 +247,7 @@ static int daq700_auto_attach(struct comedi_device *dev, static void daq700_detach(struct comedi_device *dev) { - struct pcmcia_device *link = comedi_to_pcmcia_dev(dev); - - if (dev->iobase) - pcmcia_disable_device(link); + comedi_pcmcia_disable(dev); } static struct comedi_driver daq700_driver = { |