提交 573a9648 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

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: NH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 66dbc7b1
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册