Merge staging-next tree into Linus's latest version
[linux-drm-fsl-dcu.git] / drivers / staging / comedi / drivers / das08_cs.c
index 456661c3b8b51cf79d7a1173c0efe15c773ad609..8761a6d285dc0ff8f618b0afefc99461371cce1a 100644 (file)
@@ -142,7 +142,6 @@ static const dev_info_t dev_info = "pcm-das08";
 
 struct local_info_t {
        struct pcmcia_device *link;
-       dev_node_t node;
        int stop;
        struct bus_operations *bus;
 };
@@ -172,10 +171,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link)
        local->link = link;
        link->priv = local;
 
-       /* Interrupt setup */
-       link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
-       link->irq.Handler = NULL;
-
        /*
           General socket configuration defaults can go here.  In this
           client, we assume very little, and rely on the CIS for almost
@@ -207,10 +202,8 @@ static void das08_pcmcia_detach(struct pcmcia_device *link)
 
        dev_dbg(&link->dev, "das08_pcmcia_detach\n");
 
-       if (link->dev_node) {
-               ((struct local_info_t *)link->priv)->stop = 1;
-               das08_pcmcia_release(link);
-       }
+       ((struct local_info_t *)link->priv)->stop = 1;
+       das08_pcmcia_release(link);
 
        /* This points to the parent struct local_info_t struct */
        if (link->priv)
@@ -229,8 +222,7 @@ static int das08_pcmcia_config_loop(struct pcmcia_device *p_dev,
                return -ENODEV;
 
        /* Do we need to allocate an interrupt? */
-       if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1)
-               p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
+       p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
 
        /* IO window settings */
        p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0;
@@ -266,7 +258,6 @@ static int das08_pcmcia_config_loop(struct pcmcia_device *p_dev,
 
 static void das08_pcmcia_config(struct pcmcia_device *link)
 {
-       struct local_info_t *dev = link->priv;
        int ret;
 
        dev_dbg(&link->dev, "das08_pcmcia_config\n");
@@ -277,11 +268,8 @@ static void das08_pcmcia_config(struct pcmcia_device *link)
                goto failed;
        }
 
-       if (link->conf.Attributes & CONF_ENABLE_IRQ) {
-               ret = pcmcia_request_irq(link, &link->irq);
-               if (ret)
-                       goto failed;
-       }
+       if (!link->irq)
+               goto failed;
 
        /*
           This actually configures the PCMCIA socket -- setting up
@@ -292,19 +280,10 @@ static void das08_pcmcia_config(struct pcmcia_device *link)
        if (ret)
                goto failed;
 
-       /*
-          At this point, the dev_node_t structure(s) need to be
-          initialized and arranged in a linked list at link->dev.
-        */
-       sprintf(dev->node.dev_name, "pcm-das08");
-       dev->node.major = dev->node.minor = 0;
-       link->dev_node = &dev->node;
-
        /* Finally, report what we've done */
-       printk(KERN_INFO "%s: index 0x%02x",
-              dev->node.dev_name, link->conf.ConfigIndex);
+       dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex);
        if (link->conf.Attributes & CONF_ENABLE_IRQ)
-               printk(", irq %u", link->irq.AssignedIRQ);
+               printk(", irq %u", link->irq);
        if (link->io.NumPorts1)
                printk(", io 0x%04x-0x%04x", link->io.BasePort1,
                       link->io.BasePort1 + link->io.NumPorts1 - 1);