pcmcia: convert pcmcia_request_configuration to pcmcia_enable_device
[deliverable/linux.git] / drivers / staging / comedi / drivers / ni_labpc_cs.c
index 2e27a3048cb878c3d6eb9e8a7d8d8306b393f274..255cf40c5fd1417017982a9b0886fd188928cb2d 100644 (file)
@@ -71,7 +71,6 @@ NI manuals:
 #include "comedi_fc.h"
 #include "ni_labpc.h"
 
-#include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/cisreg.h>
 #include <pcmcia/ds.h>
@@ -219,15 +218,6 @@ static int labpc_cs_attach(struct pcmcia_device *link)
        local->link = link;
        link->priv = local;
 
-       /*
-          General socket configuration defaults can go here.  In this
-          client, we assume very little, and rely on the CIS for almost
-          everything.  In most clients, many details (i.e., number, sizes,
-          and attributes of IO windows) are fixed by the nature of the
-          device, and can be hard-wired here.
-        */
-       link->conf.Attributes = 0;
-
        pcmcia_cur_dev = link;
 
        labpc_config(link);
@@ -281,10 +271,10 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,
 
        /* Does this card need audio output? */
        if (cfg->flags & CISTPL_CFTABLE_AUDIO)
-               p_dev->conf.Attributes |= CONF_ENABLE_SPKR;
+               p_dev->config_flags |= CONF_ENABLE_SPKR;
 
        /* Do we need to allocate an interrupt? */
-       p_dev->conf.Attributes |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
+       p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
 
        /* IO window settings */
        p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -331,14 +321,14 @@ static void labpc_config(struct pcmcia_device *link)
           the I/O windows and the interrupt mapping, and putting the
           card and host interface into "Memory and IO" mode.
         */
-       ret = pcmcia_request_configuration(link, &link->conf);
+       p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
+       ret = pcmcia_enable_device(link);
        if (ret)
                goto failed;
 
        /* Finally, report what we've done */
        dev_info(&link->dev, "index 0x%02x", link->config_index);
-       if (link->conf.Attributes & CONF_ENABLE_IRQ)
-               printk(", irq %d", link->irq);
+       printk(", irq %d", link->irq);
        if (link->resource[0])
                printk(" & %pR", link->resource[0]);
        if (link->resource[1])
This page took 0.026817 seconds and 5 git commands to generate.