pcmcia: introduce autoconfiguration feature
[linux-2.6.git] / drivers / staging / comedi / drivers / ni_daq_700.c
index 803683b..f22dc0f 100644 (file)
@@ -532,19 +532,11 @@ static void dio700_cs_detach(struct pcmcia_device *link)
 static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev,
                                cistpl_cftable_entry_t *cfg,
                                cistpl_cftable_entry_t *dflt,
-                               unsigned int vcc,
                                void *priv_data)
 {
        if (cfg->index == 0)
                return -ENODEV;
 
-       /* Does this card need audio output? */
-       if (cfg->flags & CISTPL_CFTABLE_AUDIO)
-               p_dev->config_flags |= CONF_ENABLE_SPKR;
-
-       /* Do we need to allocate an interrupt? */
-       p_dev->config_flags |= CONF_ENABLE_IRQ;
-
        /* IO window settings */
        p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
        if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) {
@@ -578,6 +570,8 @@ static void dio700_config(struct pcmcia_device *link)
 
        dev_dbg(&link->dev, "dio700_config\n");
 
+       link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_AUDIO;
+
        ret = pcmcia_loop_config(link, dio700_pcmcia_config_loop, NULL);
        if (ret) {
                dev_warn(&link->dev, "no configuration found\n");