diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-02-04 21:21:31 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-04 22:47:19 (GMT) |
commit | 95f932cea3b59003fc019acbf32fadb53a529778 (patch) | |
tree | 5813580e6825a37338957dd34c31bdad6d09d1a3 /drivers | |
parent | 7fadd565f0f84ec4402ad33546d7eec7a98220ea (diff) | |
download | linux-fsl-qoriq-95f932cea3b59003fc019acbf32fadb53a529778.tar.xz |
staging: comedi: das08_cs: use comedi_pcmcia_{enable, disable}
Use the comedi_pcmcia_{enable,disable} helpers to enable/disable
the PCMCIA device.
This driver does not use interrupts so remove CONF_ENABLE_IRQ 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/das08_cs.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index 4654b60..818a609 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c @@ -69,15 +69,6 @@ static const struct das08_board_struct das08_cs_boards[] = { }, }; -static int das08_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 das08_cs_auto_attach(struct comedi_device *dev, unsigned long context) { @@ -89,16 +80,8 @@ static int das08_cs_auto_attach(struct comedi_device *dev, /* The das08 driver needs the board_ptr */ dev->board_ptr = &das08_cs_boards[0]; - link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; - - ret = pcmcia_loop_config(link, das08_pcmcia_config_loop, NULL); - if (ret) - return ret; - - if (!link->irq) - return -EINVAL; - - ret = pcmcia_enable_device(link); + link->config_flags |= CONF_AUTO_SET_IO; + ret = comedi_pcmcia_enable(dev); if (ret) return ret; iobase = link->resource[0]->start; @@ -113,11 +96,8 @@ static int das08_cs_auto_attach(struct comedi_device *dev, static void das08_cs_detach(struct comedi_device *dev) { - struct pcmcia_device *link = comedi_to_pcmcia_dev(dev); - das08_common_detach(dev); - if (dev->iobase) - pcmcia_disable_device(link); + comedi_pcmcia_disable(dev); } static struct comedi_driver driver_das08_cs = { |