diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-24 09:58:54 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-03 03:03:59 -0400 |
commit | 9a017a910346afd88ec2e065989903bf211a7d37 (patch) | |
tree | b407945c6e762f252bb81ae0fd64c745bba2ad11 /drivers/net/pcmcia | |
parent | 2ce4905e4da9f512b38f56a53ece9da2072dd164 (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/pcmcia')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/3c589_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/pcmcia/com20020_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/pcmcia/ibmtr_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/nmclan_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 18 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 10 |
10 files changed, 26 insertions, 26 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 */ |