Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
[sfrench/cifs-2.6.git] / drivers / staging / comedi / drivers / ni_daq_dio24.c
index caccece20855e4e8b905ef48ebaa5b43836b769c..773ae2044e0ee8a52435f14879563dd37597d6f4 100644 (file)
@@ -210,14 +210,6 @@ static void dio24_cs_detach(struct pcmcia_device *);
    less on other parts of the kernel.
 */
 
-/*
-   The dev_info variable is the "key" that is used to match up this
-   device driver with appropriate cards, through the card configuration
-   database.
-*/
-
-static const dev_info_t dev_info = "ni_daq_dio24";
-
 struct local_info_t {
        struct pcmcia_device *link;
        int stop;
@@ -288,8 +280,7 @@ static void dio24_cs_detach(struct pcmcia_device *link)
        dio24_release(link);
 
        /* This points to the parent local_info_t struct */
-       if (link->priv)
-               kfree(link->priv);
+       kfree(link->priv);
 
 }                              /* dio24_cs_detach */
 
@@ -307,8 +298,6 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
                                unsigned int vcc,
                                void *priv_data)
 {
-       win_req_t *req = priv_data;
-
        if (cfg->index == 0)
                return -ENODEV;
 
@@ -341,22 +330,6 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
                        return -ENODEV;
        }
 
-       if ((cfg->mem.nwin > 0) || (dflt->mem.nwin > 0)) {
-               cistpl_mem_t *mem =
-                       (cfg->mem.nwin) ? &cfg->mem : &dflt->mem;
-               req->Attributes = WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_CM;
-               req->Attributes |= WIN_ENABLE;
-               req->Base = mem->win[0].host_addr;
-               req->Size = mem->win[0].len;
-               if (req->Size < 0x1000)
-                       req->Size = 0x1000;
-               req->AccessSpeed = 0;
-               if (pcmcia_request_window(p_dev, req, &p_dev->win))
-                       return -ENODEV;
-               if (pcmcia_map_mem_page(p_dev, p_dev->win,
-                                               mem->win[0].card_addr))
-                       return -ENODEV;
-       }
        /* If we got this far, we're cool! */
        return 0;
 }
@@ -364,13 +337,12 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
 static void dio24_config(struct pcmcia_device *link)
 {
        int ret;
-       win_req_t req;
 
        printk(KERN_INFO "ni_daq_dio24: HOLA SOY YO! - config\n");
 
        dev_dbg(&link->dev, "dio24_config\n");
 
-       ret = pcmcia_loop_config(link, dio24_pcmcia_config_loop, &req);
+       ret = pcmcia_loop_config(link, dio24_pcmcia_config_loop, NULL);
        if (ret) {
                dev_warn(&link->dev, "no configuration found\n");
                goto failed;
@@ -396,9 +368,6 @@ static void dio24_config(struct pcmcia_device *link)
                printk(" & %pR", link->resource[0]);
        if (link->resource[1])
                printk(" & %pR", link->resource[1]);
-       if (link->win)
-               printk(", mem 0x%06lx-0x%06lx", req.Base,
-                      req.Base + req.Size - 1);
        printk("\n");
 
        return;
@@ -467,7 +436,7 @@ struct pcmcia_driver dio24_cs_driver = {
        .id_table = dio24_cs_ids,
        .owner = THIS_MODULE,
        .drv = {
-               .name = dev_info,
+               .name = "ni_daq_dio24",
                },
 };