pcmcia: do not use io_req_t when calling pcmcia_request_io()
[deliverable/linux.git] / drivers / net / pcmcia / smc91c92_cs.c
index 1b0b3230dd717f05ed6ff839840f95705b3ad437..a5e47796f6aeb4e7fdbb79c0f0560c0209849c94 100644 (file)
@@ -324,9 +324,8 @@ static int smc91c92_probe(struct pcmcia_device *link)
     link->priv = dev;
 
     spin_lock_init(&smc->lock);
-    link->io.NumPorts1 = 16;
-    link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
-    link->io.IOAddrLines = 4;
+    link->resource[0]->end = 16;
+    link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
     link->conf.Attributes = CONF_ENABLE_IRQ;
     link->conf.IntType = INT_MEMORY_AND_IO;
 
@@ -427,12 +426,13 @@ static int mhz_mfc_config_check(struct pcmcia_device *p_dev,
                                void *priv_data)
 {
        int k;
-       p_dev->io.BasePort2 = cf->io.win[0].base;
+       p_dev->resource[1]->start = cf->io.win[0].base;
        for (k = 0; k < 0x400; k += 0x10) {
                if (k & 0x80)
                        continue;
-               p_dev->io.BasePort1 = k ^ 0x300;
-               if (!pcmcia_request_io(p_dev, &p_dev->io))
+               p_dev->resource[0]->start = k ^ 0x300;
+               p_dev->io_lines = 16;
+               if (!pcmcia_request_io(p_dev))
                        return 0;
        }
        return -ENODEV;
@@ -448,9 +448,8 @@ static int mhz_mfc_config(struct pcmcia_device *link)
 
     link->conf.Attributes |= CONF_ENABLE_SPKR;
     link->conf.Status = CCSR_AUDIO_ENA;
-    link->io.IOAddrLines = 16;
-    link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
-    link->io.NumPorts2 = 8;
+    link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
+    link->resource[1]->end = 8;
 
     /* The Megahertz combo cards have modem-like CIS entries, so
        we have to explicitly try a bunch of port combinations. */
@@ -601,9 +600,9 @@ static int smc_configcheck(struct pcmcia_device *p_dev,
                           unsigned int vcc,
                           void *priv_data)
 {
-       p_dev->io.BasePort1 = cf->io.win[0].base;
-       p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK;
-       return pcmcia_request_io(p_dev, &p_dev->io);
+       p_dev->resource[0]->start = cf->io.win[0].base;
+       p_dev->io_lines = cf->io.flags & CISTPL_IO_LINES_MASK;
+       return pcmcia_request_io(p_dev);
 }
 
 static int smc_config(struct pcmcia_device *link)
@@ -611,7 +610,7 @@ static int smc_config(struct pcmcia_device *link)
     struct net_device *dev = link->priv;
     int i;
 
-    link->io.NumPorts1 = 16;
+    link->resource[0]->end = 16;
     i = pcmcia_loop_config(link, smc_configcheck, NULL);
     if (!i)
            dev->base_addr = link->resource[0]->start;
@@ -646,25 +645,25 @@ static int osi_config(struct pcmcia_device *link)
 
     link->conf.Attributes |= CONF_ENABLE_SPKR;
     link->conf.Status = CCSR_AUDIO_ENA;
-    link->io.NumPorts1 = 64;
-    link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
-    link->io.NumPorts2 = 8;
-    link->io.IOAddrLines = 16;
+    link->resource[0]->end = 64;
+    link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
+    link->resource[1]->end = 8;
 
     /* Enable Hard Decode, LAN, Modem */
     link->conf.ConfigIndex = 0x23;
+    link->io_lines = 16;
 
     for (i = j = 0; j < 4; j++) {
-       link->io.BasePort2 = com[j];
-       i = pcmcia_request_io(link, &link->io);
+       link->resource[1]->start = com[j];
+       i = pcmcia_request_io(link);
        if (i == 0)
                break;
     }
     if (i != 0) {
        /* Fallback: turn off hard decode */
        link->conf.ConfigIndex = 0x03;
-       link->io.NumPorts2 = 0;
-       i = pcmcia_request_io(link, &link->io);
+       link->resource[1]->end = 0;
+       i = pcmcia_request_io(link);
     }
     dev->base_addr = link->resource[0]->start + 0x10;
     return i;
@@ -803,7 +802,7 @@ static int check_sig(struct pcmcia_device *link)
     }
 
     /* Try setting bus width */
-    width = (link->io.Attributes1 == IO_DATA_PATH_WIDTH_AUTO);
+    width = (link->resource[0]->flags == IO_DATA_PATH_WIDTH_AUTO);
     s = inb(ioaddr + CONFIG);
     if (width)
        s |= CFG_16BIT;
This page took 0.03047 seconds and 5 git commands to generate.