aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-24 09:58:54 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-08-03 03:03:59 -0400
commit9a017a910346afd88ec2e065989903bf211a7d37 (patch)
treeb407945c6e762f252bb81ae0fd64c745bba2ad11 /drivers/net
parent2ce4905e4da9f512b38f56a53ece9da2072dd164 (diff)
pcmcia: do not use io_req_t after call to pcmcia_request_io()
After pcmcia_request_io(), do not make use of the values stored in io_req_t, but instead use those found in struct pcmcia_device->resource[]. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/pcmcia/3c574_cs.c2
-rw-r--r--drivers/net/pcmcia/3c589_cs.c2
-rw-r--r--drivers/net/pcmcia/axnet_cs.c4
-rw-r--r--drivers/net/pcmcia/com20020_cs.c2
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c6
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c2
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c2
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c4
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c18
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c10
-rw-r--r--drivers/net/wireless/airo_cs.c12
-rw-r--r--drivers/net/wireless/atmel_cs.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c18
-rw-r--r--drivers/net/wireless/libertas/if_cs.c7
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c5
-rw-r--r--drivers/net/wireless/orinoco/spectrum_cs.c5
-rw-r--r--drivers/net/wireless/wl3501_cs.c2
17 files changed, 50 insertions, 53 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index e249b898075c..b5ea9b8cfd76 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -356,7 +356,7 @@ static int tc574_config(struct pcmcia_device *link)
356 goto failed; 356 goto failed;
357 357
358 dev->irq = link->irq; 358 dev->irq = link->irq;
359 dev->base_addr = link->io.BasePort1; 359 dev->base_addr = link->resource[0]->start;
360 360
361 ioaddr = dev->base_addr; 361 ioaddr = dev->base_addr;
362 362
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index b0772df31057..122ef4a9488c 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -298,7 +298,7 @@ static int tc589_config(struct pcmcia_device *link)
298 goto failed; 298 goto failed;
299 299
300 dev->irq = link->irq; 300 dev->irq = link->irq;
301 dev->base_addr = link->io.BasePort1; 301 dev->base_addr = link->resource[0]->start;
302 ioaddr = dev->base_addr; 302 ioaddr = dev->base_addr;
303 EL3WINDOW(0); 303 EL3WINDOW(0);
304 304
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index ee0a6d036f94..c52fdf31cbfe 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -332,7 +332,7 @@ static int axnet_config(struct pcmcia_device *link)
332 if (!link->irq) 332 if (!link->irq)
333 goto failed; 333 goto failed;
334 334
335 if (link->io.NumPorts2 == 8) { 335 if (resource_size(link->resource[1]) == 8) {
336 link->conf.Attributes |= CONF_ENABLE_SPKR; 336 link->conf.Attributes |= CONF_ENABLE_SPKR;
337 link->conf.Status = CCSR_AUDIO_ENA; 337 link->conf.Status = CCSR_AUDIO_ENA;
338 } 338 }
@@ -342,7 +342,7 @@ static int axnet_config(struct pcmcia_device *link)
342 goto failed; 342 goto failed;
343 343
344 dev->irq = link->irq; 344 dev->irq = link->irq;
345 dev->base_addr = link->io.BasePort1; 345 dev->base_addr = link->resource[0]->start;
346 346
347 if (!get_prom(link)) { 347 if (!get_prom(link)) {
348 printk(KERN_NOTICE "axnet_cs: this is not an AX88190 card!\n"); 348 printk(KERN_NOTICE "axnet_cs: this is not an AX88190 card!\n");
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index 99957af40329..3b53818e3eef 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -266,7 +266,7 @@ static int com20020_config(struct pcmcia_device *link)
266 goto failed; 266 goto failed;
267 } 267 }
268 268
269 ioaddr = dev->base_addr = link->io.BasePort1; 269 ioaddr = dev->base_addr = link->resource[0]->start;
270 dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr); 270 dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr);
271 271
272 dev_dbg(&link->dev, "request IRQ %d\n", 272 dev_dbg(&link->dev, "request IRQ %d\n",
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 95a991beaa30..bba6369a028e 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -315,7 +315,7 @@ static int ungermann_try_io_port(struct pcmcia_device *link)
315 if (ret == 0) { 315 if (ret == 0) {
316 /* calculate ConfigIndex value */ 316 /* calculate ConfigIndex value */
317 link->conf.ConfigIndex = 317 link->conf.ConfigIndex =
318 ((link->io.BasePort1 & 0x0f0) >> 3) | 0x22; 318 ((link->resource[0]->start & 0x0f0) >> 3) | 0x22;
319 return ret; 319 return ret;
320 } 320 }
321 } 321 }
@@ -436,9 +436,9 @@ static int fmvj18x_config(struct pcmcia_device *link)
436 goto failed; 436 goto failed;
437 437
438 dev->irq = link->irq; 438 dev->irq = link->irq;
439 dev->base_addr = link->io.BasePort1; 439 dev->base_addr = link->resource[0]->start;
440 440
441 if (link->io.BasePort2 != 0) { 441 if (resource_size(link->resource[1]) != 0) {
442 ret = fmvj18x_setup_mfc(link); 442 ret = fmvj18x_setup_mfc(link);
443 if (ret != 0) goto failed; 443 if (ret != 0) goto failed;
444 } 444 }
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index c36dcd14ec45..e99abaa92be5 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -231,7 +231,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
231 if (ret) 231 if (ret)
232 goto failed; 232 goto failed;
233 } 233 }
234 dev->base_addr = link->io.BasePort1; 234 dev->base_addr = link->resource[0]->start;
235 235
236 ret = pcmcia_request_exclusive_irq(link, ibmtr_interrupt); 236 ret = pcmcia_request_exclusive_irq(link, ibmtr_interrupt);
237 if (ret) 237 if (ret)
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index c0d85af3e942..9980cbb81d34 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -655,7 +655,7 @@ static int nmclan_config(struct pcmcia_device *link)
655 goto failed; 655 goto failed;
656 656
657 dev->irq = link->irq; 657 dev->irq = link->irq;
658 dev->base_addr = link->io.BasePort1; 658 dev->base_addr = link->resource[0]->start;
659 659
660 ioaddr = dev->base_addr; 660 ioaddr = dev->base_addr;
661 661
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index db6dbdabb702..c9cd2377ef91 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -554,7 +554,7 @@ static int pcnet_config(struct pcmcia_device *link)
554 if (!link->irq) 554 if (!link->irq)
555 goto failed; 555 goto failed;
556 556
557 if (link->io.NumPorts2 == 8) { 557 if (resource_size(link->resource[1]) == 8) {
558 link->conf.Attributes |= CONF_ENABLE_SPKR; 558 link->conf.Attributes |= CONF_ENABLE_SPKR;
559 link->conf.Status = CCSR_AUDIO_ENA; 559 link->conf.Status = CCSR_AUDIO_ENA;
560 } 560 }
@@ -566,7 +566,7 @@ static int pcnet_config(struct pcmcia_device *link)
566 if (ret) 566 if (ret)
567 goto failed; 567 goto failed;
568 dev->irq = link->irq; 568 dev->irq = link->irq;
569 dev->base_addr = link->io.BasePort1; 569 dev->base_addr = link->resource[0]->start;
570 if (info->flags & HAS_MISC_REG) { 570 if (info->flags & HAS_MISC_REG) {
571 if ((if_port == 1) || (if_port == 2)) 571 if ((if_port == 1) || (if_port == 2))
572 dev->if_port = if_port; 572 dev->if_port = if_port;
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 88f503a80a8e..1b0b3230dd71 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -457,7 +457,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)
457 if (pcmcia_loop_config(link, mhz_mfc_config_check, NULL)) 457 if (pcmcia_loop_config(link, mhz_mfc_config_check, NULL))
458 return -ENODEV; 458 return -ENODEV;
459 459
460 dev->base_addr = link->io.BasePort1; 460 dev->base_addr = link->resource[0]->start;
461 461
462 /* Allocate a memory window, for accessing the ISR */ 462 /* Allocate a memory window, for accessing the ISR */
463 req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE; 463 req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;
@@ -545,7 +545,7 @@ static void mot_config(struct pcmcia_device *link)
545 struct net_device *dev = link->priv; 545 struct net_device *dev = link->priv;
546 struct smc_private *smc = netdev_priv(dev); 546 struct smc_private *smc = netdev_priv(dev);
547 unsigned int ioaddr = dev->base_addr; 547 unsigned int ioaddr = dev->base_addr;
548 unsigned int iouart = link->io.BasePort2; 548 unsigned int iouart = link->resource[1]->start;
549 549
550 /* Set UART base address and force map with COR bit 1 */ 550 /* Set UART base address and force map with COR bit 1 */
551 writeb(iouart & 0xff, smc->base + MOT_UART + CISREG_IOBASE_0); 551 writeb(iouart & 0xff, smc->base + MOT_UART + CISREG_IOBASE_0);
@@ -614,7 +614,7 @@ static int smc_config(struct pcmcia_device *link)
614 link->io.NumPorts1 = 16; 614 link->io.NumPorts1 = 16;
615 i = pcmcia_loop_config(link, smc_configcheck, NULL); 615 i = pcmcia_loop_config(link, smc_configcheck, NULL);
616 if (!i) 616 if (!i)
617 dev->base_addr = link->io.BasePort1; 617 dev->base_addr = link->resource[0]->start;
618 618
619 return i; 619 return i;
620} 620}
@@ -666,7 +666,7 @@ static int osi_config(struct pcmcia_device *link)
666 link->io.NumPorts2 = 0; 666 link->io.NumPorts2 = 0;
667 i = pcmcia_request_io(link, &link->io); 667 i = pcmcia_request_io(link, &link->io);
668 } 668 }
669 dev->base_addr = link->io.BasePort1 + 0x10; 669 dev->base_addr = link->resource[0]->start + 0x10;
670 return i; 670 return i;
671} 671}
672 672
@@ -683,7 +683,7 @@ static int osi_load_firmware(struct pcmcia_device *link)
683 683
684 /* Download the Seven of Diamonds firmware */ 684 /* Download the Seven of Diamonds firmware */
685 for (i = 0; i < fw->size; i++) { 685 for (i = 0; i < fw->size; i++) {
686 outb(fw->data[i], link->io.BasePort1 + 2); 686 outb(fw->data[i], link->resource[0]->start + 2);
687 udelay(50); 687 udelay(50);
688 } 688 }
689 release_firmware(fw); 689 release_firmware(fw);
@@ -725,12 +725,12 @@ static int osi_setup(struct pcmcia_device *link, u_short manfid, u_short cardid)
725 return rc; 725 return rc;
726 } else if (manfid == MANFID_OSITECH) { 726 } else if (manfid == MANFID_OSITECH) {
727 /* Make sure both functions are powered up */ 727 /* Make sure both functions are powered up */
728 set_bits(0x300, link->io.BasePort1 + OSITECH_AUI_PWR); 728 set_bits(0x300, link->resource[0]->start + OSITECH_AUI_PWR);
729 /* Now, turn on the interrupt for both card functions */ 729 /* Now, turn on the interrupt for both card functions */
730 set_bits(0x300, link->io.BasePort1 + OSITECH_RESET_ISR); 730 set_bits(0x300, link->resource[0]->start + OSITECH_RESET_ISR);
731 dev_dbg(&link->dev, "AUI/PWR: %4.4x RESET/ISR: %4.4x\n", 731 dev_dbg(&link->dev, "AUI/PWR: %4.4x RESET/ISR: %4.4x\n",
732 inw(link->io.BasePort1 + OSITECH_AUI_PWR), 732 inw(link->resource[0]->start + OSITECH_AUI_PWR),
733 inw(link->io.BasePort1 + OSITECH_RESET_ISR)); 733 inw(link->resource[0]->start + OSITECH_RESET_ISR));
734 } 734 }
735 return 0; 735 return 0;
736} 736}
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index e3a85ce89880..034920b459d1 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -877,13 +877,13 @@ xirc2ps_config(struct pcmcia_device * link)
877 * the base address of the ethernet port (BasePort1) is written 877 * the base address of the ethernet port (BasePort1) is written
878 * to the BAR registers of the modem. 878 * to the BAR registers of the modem.
879 */ 879 */
880 err = pcmcia_write_config_byte(link, CISREG_IOBASE_0, 880 err = pcmcia_write_config_byte(link, CISREG_IOBASE_0, (u8)
881 link->io.BasePort2 & 0xff); 881 link->resource[1]->start & 0xff);
882 if (err) 882 if (err)
883 goto config_error; 883 goto config_error;
884 884
885 err = pcmcia_write_config_byte(link, CISREG_IOBASE_1, 885 err = pcmcia_write_config_byte(link, CISREG_IOBASE_1,
886 (link->io.BasePort2 >> 8) & 0xff); 886 (link->resource[1]->start >> 8) & 0xff);
887 if (err) 887 if (err)
888 goto config_error; 888 goto config_error;
889 889
@@ -907,7 +907,7 @@ xirc2ps_config(struct pcmcia_device * link)
907 * part. 907 * part.
908 */ 908 */
909 writeb(0x47, local->dingo_ccr + CISREG_COR); 909 writeb(0x47, local->dingo_ccr + CISREG_COR);
910 ioaddr = link->io.BasePort1; 910 ioaddr = link->resource[0]->start;
911 writeb(ioaddr & 0xff , local->dingo_ccr + CISREG_IOBASE_0); 911 writeb(ioaddr & 0xff , local->dingo_ccr + CISREG_IOBASE_0);
912 writeb((ioaddr >> 8)&0xff , local->dingo_ccr + CISREG_IOBASE_1); 912 writeb((ioaddr >> 8)&0xff , local->dingo_ccr + CISREG_IOBASE_1);
913 913
@@ -954,7 +954,7 @@ xirc2ps_config(struct pcmcia_device * link)
954 954
955 /* we can now register the device with the net subsystem */ 955 /* we can now register the device with the net subsystem */
956 dev->irq = link->irq; 956 dev->irq = link->irq;
957 dev->base_addr = link->io.BasePort1; 957 dev->base_addr = link->resource[0]->start;
958 958
959 if (local->dingo) 959 if (local->dingo)
960 do_reset(dev, 1); /* a kludge to make the cem56 work */ 960 do_reset(dev, 1); /* a kludge to make the cem56 work */
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 9389ba004fb9..b7e7f5054e44 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -271,7 +271,7 @@ static int airo_config(struct pcmcia_device *link)
271 goto failed; 271 goto failed;
272 ((local_info_t *)link->priv)->eth_dev = 272 ((local_info_t *)link->priv)->eth_dev =
273 init_airo_card(link->irq, 273 init_airo_card(link->irq,
274 link->io.BasePort1, 1, &link->dev); 274 link->resource[0]->start, 1, &link->dev);
275 if (!((local_info_t *)link->priv)->eth_dev) 275 if (!((local_info_t *)link->priv)->eth_dev)
276 goto failed; 276 goto failed;
277 277
@@ -281,12 +281,10 @@ static int airo_config(struct pcmcia_device *link)
281 if (link->conf.Vpp) 281 if (link->conf.Vpp)
282 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); 282 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
283 printk(", irq %d", link->irq); 283 printk(", irq %d", link->irq);
284 if (link->io.NumPorts1) 284 if (link->resource[0])
285 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 285 printk(" & %pR", link->resource[0]);
286 link->io.BasePort1+link->io.NumPorts1-1); 286 if (link->resource[1])
287 if (link->io.NumPorts2) 287 printk(" & %pR", link->resource[1]);
288 printk(" & 0x%04x-0x%04x", link->io.BasePort2,
289 link->io.BasePort2+link->io.NumPorts2-1);
290 if (link->win) 288 if (link->win)
291 printk(", mem 0x%06lx-0x%06lx", req->Base, 289 printk(", mem 0x%06lx-0x%06lx", req->Base,
292 req->Base+req->Size-1); 290 req->Base+req->Size-1);
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 91ee74a8801e..65b3aed49e58 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -253,7 +253,7 @@ static int atmel_config(struct pcmcia_device *link)
253 253
254 ((local_info_t*)link->priv)->eth_dev = 254 ((local_info_t*)link->priv)->eth_dev =
255 init_atmel_card(link->irq, 255 init_atmel_card(link->irq,
256 link->io.BasePort1, 256 link->resource[0]->start,
257 did ? did->driver_info : ATMEL_FW_TYPE_NONE, 257 did ? did->driver_info : ATMEL_FW_TYPE_NONE,
258 &link->dev, 258 &link->dev,
259 card_present, 259 card_present,
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 691293675a93..4e13cedb8235 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -227,7 +227,7 @@ static void sandisk_set_iobase(local_info_t *local)
227 struct hostap_cs_priv *hw_priv = local->hw_priv; 227 struct hostap_cs_priv *hw_priv = local->hw_priv;
228 228
229 res = pcmcia_write_config_byte(hw_priv->link, 0x10, 229 res = pcmcia_write_config_byte(hw_priv->link, 0x10,
230 hw_priv->link->io.BasePort1 & 0x00ff); 230 hw_priv->link->resource[0]->start & 0x00ff);
231 if (res != 0) { 231 if (res != 0) {
232 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -" 232 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -"
233 " res=%d\n", res); 233 " res=%d\n", res);
@@ -235,7 +235,7 @@ static void sandisk_set_iobase(local_info_t *local)
235 udelay(10); 235 udelay(10);
236 236
237 res = pcmcia_write_config_byte(hw_priv->link, 0x12, 237 res = pcmcia_write_config_byte(hw_priv->link, 0x12,
238 (hw_priv->link->io.BasePort1 >> 8) & 0x00ff); 238 (hw_priv->link->resource[0]->start >> 8) & 0x00ff);
239 if (res != 0) { 239 if (res != 0) {
240 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -" 240 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -"
241 " res=%d\n", res); 241 " res=%d\n", res);
@@ -265,7 +265,7 @@ static int sandisk_enable_wireless(struct net_device *dev)
265 local_info_t *local = iface->local; 265 local_info_t *local = iface->local;
266 struct hostap_cs_priv *hw_priv = local->hw_priv; 266 struct hostap_cs_priv *hw_priv = local->hw_priv;
267 267
268 if (hw_priv->link->io.NumPorts1 < 0x42) { 268 if (resource_size(hw_priv->link->resource[0]) < 0x42) {
269 /* Not enough ports to be SanDisk multi-function card */ 269 /* Not enough ports to be SanDisk multi-function card */
270 ret = -ENODEV; 270 ret = -ENODEV;
271 goto done; 271 goto done;
@@ -604,7 +604,7 @@ static int prism2_config(struct pcmcia_device *link)
604 goto failed_unlock; 604 goto failed_unlock;
605 605
606 dev->irq = link->irq; 606 dev->irq = link->irq;
607 dev->base_addr = link->io.BasePort1; 607 dev->base_addr = link->resource[0]->start;
608 608
609 spin_unlock_irqrestore(&local->irq_init_lock, flags); 609 spin_unlock_irqrestore(&local->irq_init_lock, flags);
610 610
@@ -616,12 +616,10 @@ static int prism2_config(struct pcmcia_device *link)
616 link->conf.Vpp % 10); 616 link->conf.Vpp % 10);
617 if (link->conf.Attributes & CONF_ENABLE_IRQ) 617 if (link->conf.Attributes & CONF_ENABLE_IRQ)
618 printk(", irq %d", link->irq); 618 printk(", irq %d", link->irq);
619 if (link->io.NumPorts1) 619 if (link->resource[0])
620 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 620 printk(" & %pR", link->resource[0]);
621 link->io.BasePort1+link->io.NumPorts1-1); 621 if (link->resource[1])
622 if (link->io.NumPorts2) 622 printk(" & %pR", link->resource[1]);
623 printk(" & 0x%04x-0x%04x", link->io.BasePort2,
624 link->io.BasePort2+link->io.NumPorts2-1);
625 printk("\n"); 623 printk("\n");
626 624
627 local->shutdown = 0; 625 local->shutdown = 0;
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 1d3a7e0e5f10..be4c47594b59 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -853,7 +853,8 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
853 goto out1; 853 goto out1;
854 854
855 /* Initialize io access */ 855 /* Initialize io access */
856 card->iobase = ioport_map(p_dev->io.BasePort1, p_dev->io.NumPorts1); 856 card->iobase = ioport_map(p_dev->resource[0]->start,
857 resource_size(p_dev->resource[0]));
857 if (!card->iobase) { 858 if (!card->iobase) {
858 lbs_pr_err("error in ioport_map\n"); 859 lbs_pr_err("error in ioport_map\n");
859 ret = -EIO; 860 ret = -EIO;
@@ -872,9 +873,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
872 } 873 }
873 874
874 /* Finally, report what we've done */ 875 /* Finally, report what we've done */
875 lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n", 876 lbs_deb_cs("irq %d, io %pR", p_dev->irq, p_dev->resource[0]);
876 p_dev->irq, p_dev->io.BasePort1,
877 p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1);
878 877
879 /* 878 /*
880 * Most of the libertas cards can do unaligned register access, but some 879 * Most of the libertas cards can do unaligned register access, but some
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index 41ca4f1b395f..6d514b5462fd 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -257,7 +257,8 @@ orinoco_cs_config(struct pcmcia_device *link)
257 /* We initialize the hermes structure before completing PCMCIA 257 /* We initialize the hermes structure before completing PCMCIA
258 * configuration just in case the interrupt handler gets 258 * configuration just in case the interrupt handler gets
259 * called. */ 259 * called. */
260 mem = ioport_map(link->io.BasePort1, link->io.NumPorts1); 260 mem = ioport_map(link->resource[0]->start,
261 resource_size(link->resource[0]));
261 if (!mem) 262 if (!mem)
262 goto failed; 263 goto failed;
263 264
@@ -279,7 +280,7 @@ orinoco_cs_config(struct pcmcia_device *link)
279 } 280 }
280 281
281 /* Register an interface with the stack */ 282 /* Register an interface with the stack */
282 if (orinoco_if_add(priv, link->io.BasePort1, 283 if (orinoco_if_add(priv, link->resource[0]->start,
283 link->irq, NULL) != 0) { 284 link->irq, NULL) != 0) {
284 printk(KERN_ERR PFX "orinoco_if_add() failed\n"); 285 printk(KERN_ERR PFX "orinoco_if_add() failed\n");
285 goto failed; 286 goto failed;
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index 39399cd2e683..4f8f55eab955 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -319,7 +319,8 @@ spectrum_cs_config(struct pcmcia_device *link)
319 /* We initialize the hermes structure before completing PCMCIA 319 /* We initialize the hermes structure before completing PCMCIA
320 * configuration just in case the interrupt handler gets 320 * configuration just in case the interrupt handler gets
321 * called. */ 321 * called. */
322 mem = ioport_map(link->io.BasePort1, link->io.NumPorts1); 322 mem = ioport_map(link->resource[0]->start,
323 resource_size(link->resource[0]));
323 if (!mem) 324 if (!mem)
324 goto failed; 325 goto failed;
325 326
@@ -346,7 +347,7 @@ spectrum_cs_config(struct pcmcia_device *link)
346 } 347 }
347 348
348 /* Register an interface with the stack */ 349 /* Register an interface with the stack */
349 if (orinoco_if_add(priv, link->io.BasePort1, 350 if (orinoco_if_add(priv, link->resource[0]->start,
350 link->irq, NULL) != 0) { 351 link->irq, NULL) != 0) {
351 printk(KERN_ERR PFX "orinoco_if_add() failed\n"); 352 printk(KERN_ERR PFX "orinoco_if_add() failed\n");
352 goto failed; 353 goto failed;
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 35f431bf97d6..a32f220648c0 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1960,7 +1960,7 @@ static int wl3501_config(struct pcmcia_device *link)
1960 goto failed; 1960 goto failed;
1961 1961
1962 dev->irq = link->irq; 1962 dev->irq = link->irq;
1963 dev->base_addr = link->io.BasePort1; 1963 dev->base_addr = link->resource[0]->start;
1964 SET_NETDEV_DEV(dev, &link->dev); 1964 SET_NETDEV_DEV(dev, &link->dev);
1965 if (register_netdev(dev)) { 1965 if (register_netdev(dev)) {
1966 printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n"); 1966 printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n");