/**
* comedi_pcmcia_enable() - Request the regions and enable the PCMCIA device.
* @dev: comedi_device struct
+ * @conf_check: optional callback to check the pcmcia_device configuration
*
* The comedi PCMCIA driver needs to set the link->config_flags, as
* appropriate for that driver, before calling this function in order
* to allow pcmcia_loop_config() to do its internal autoconfiguration.
*/
-int comedi_pcmcia_enable(struct comedi_device *dev)
+int comedi_pcmcia_enable(struct comedi_device *dev,
+ int (*conf_check)(struct pcmcia_device *, void *))
{
struct pcmcia_device *link = comedi_to_pcmcia_dev(dev);
int ret;
if (!link)
return -ENODEV;
- ret = pcmcia_loop_config(link, comedi_pcmcia_conf_check, NULL);
+ if (!conf_check)
+ conf_check = comedi_pcmcia_conf_check;
+
+ ret = pcmcia_loop_config(link, conf_check, NULL);
if (ret)
return ret;
struct pcmcia_device *comedi_to_pcmcia_dev(struct comedi_device *);
-int comedi_pcmcia_enable(struct comedi_device *);
+int comedi_pcmcia_enable(struct comedi_device *,
+ int (*conf_check)(struct pcmcia_device *, void *));
void comedi_pcmcia_disable(struct comedi_device *);
int comedi_pcmcia_auto_config(struct pcmcia_device *, struct comedi_driver *);
dev->board_name = board->name;
link->config_flags |= CONF_AUTO_SET_IO | CONF_ENABLE_IRQ;
- ret = comedi_pcmcia_enable(dev);
+ ret = comedi_pcmcia_enable(dev, NULL);
if (ret)
return ret;
dev->iobase = link->resource[0]->start;
dev->board_ptr = &das08_cs_boards[0];
link->config_flags |= CONF_AUTO_SET_IO;
- ret = comedi_pcmcia_enable(dev);
+ ret = comedi_pcmcia_enable(dev, NULL);
if (ret)
return ret;
iobase = link->resource[0]->start;
dev->board_name = dev->driver->driver_name;
link->config_flags |= CONF_AUTO_SET_IO;
- ret = comedi_pcmcia_enable(dev);
+ ret = comedi_pcmcia_enable(dev, NULL);
if (ret)
return ret;
dev->iobase = link->resource[0]->start;
dev->board_name = dev->driver->driver_name;
link->config_flags |= CONF_AUTO_SET_IO;
- ret = comedi_pcmcia_enable(dev);
+ ret = comedi_pcmcia_enable(dev, NULL);
return ret;
dev->iobase = link->resource[0]->start;
link->config_flags |= CONF_AUTO_SET_IO |
CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
- ret = comedi_pcmcia_enable(dev);
+ ret = comedi_pcmcia_enable(dev, NULL);
if (ret)
return ret;
dev->iobase = link->resource[0]->start;