diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-02-04 23:41:49 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-05 19:18:57 (GMT) |
commit | 87fe1452c6b0154e43fa7c544977279a504ad0e4 (patch) | |
tree | d62fa1b593df830cbbc928a1437aa96e33d28597 /drivers | |
parent | c04edbf2f4194d1f76dd6d0fc5d64600867eae70 (diff) | |
download | linux-fsl-qoriq-87fe1452c6b0154e43fa7c544977279a504ad0e4.tar.xz |
staging: comedi: quatech_daqp_cs: use comedi_pcmcia_{enable, disable}
Use the comedi_pcmcia_{enable,disable} helpers to enable/disable
the PCMCIA device.
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/quatech_daqp_cs.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index 6409236..869a4af 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c @@ -718,14 +718,6 @@ static int daqp_do_insn_write(struct comedi_device *dev, return 1; } -static int daqp_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 daqp_auto_attach(struct comedi_device *dev, unsigned long context) { @@ -742,20 +734,16 @@ static int daqp_auto_attach(struct comedi_device *dev, return -ENOMEM; link->config_flags |= CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; - ret = pcmcia_loop_config(link, daqp_pcmcia_config_loop, NULL); + ret = comedi_pcmcia_enable(dev); if (ret) return ret; + dev->iobase = link->resource[0]->start; link->priv = local; ret = pcmcia_request_irq(link, daqp_interrupt); if (ret) return ret; - ret = pcmcia_enable_device(link); - if (ret) - return ret; - dev->iobase = link->resource[0]->start; - ret = comedi_alloc_subdevices(dev, 4); if (ret) return ret; @@ -804,9 +792,7 @@ static int daqp_auto_attach(struct comedi_device *dev, static void daqp_detach(struct comedi_device *dev) { - struct pcmcia_device *link = comedi_to_pcmcia_dev(dev); - - pcmcia_disable_device(link); + comedi_pcmcia_disable(dev); } static struct comedi_driver driver_daqp = { |