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/serial | |
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/serial')
-rw-r--r-- | drivers/serial/serial_cs.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 2be8b107ed51..fe7adcdfde9e 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -463,13 +463,13 @@ static int simple_config(struct pcmcia_device *link) | |||
463 | /* If the card is already configured, look up the port and irq */ | 463 | /* If the card is already configured, look up the port and irq */ |
464 | if (link->function_config) { | 464 | if (link->function_config) { |
465 | unsigned int port = 0; | 465 | unsigned int port = 0; |
466 | if ((link->io.BasePort2 != 0) && | 466 | if ((link->resource[1]->end != 0) && |
467 | (link->io.NumPorts2 == 8)) { | 467 | (resource_size(link->resource[1]) == 8)) { |
468 | port = link->io.BasePort2; | 468 | port = link->resource[1]->end; |
469 | info->slave = 1; | 469 | info->slave = 1; |
470 | } else if ((info->manfid == MANFID_OSITECH) && | 470 | } else if ((info->manfid == MANFID_OSITECH) && |
471 | (link->io.NumPorts1 == 0x40)) { | 471 | (resource_size(link->resource[0]) == 0x40)) { |
472 | port = link->io.BasePort1 + 0x28; | 472 | port = link->resource[0]->start + 0x28; |
473 | info->slave = 1; | 473 | info->slave = 1; |
474 | } | 474 | } |
475 | if (info->slave) { | 475 | if (info->slave) { |
@@ -507,7 +507,7 @@ found_port: | |||
507 | i = pcmcia_request_configuration(link, &link->conf); | 507 | i = pcmcia_request_configuration(link, &link->conf); |
508 | if (i != 0) | 508 | if (i != 0) |
509 | return -1; | 509 | return -1; |
510 | return setup_serial(link, info, link->io.BasePort1, link->irq); | 510 | return setup_serial(link, info, link->resource[0]->start, link->irq); |
511 | } | 511 | } |
512 | 512 | ||
513 | static int multi_config_check(struct pcmcia_device *p_dev, | 513 | static int multi_config_check(struct pcmcia_device *p_dev, |
@@ -524,7 +524,7 @@ static int multi_config_check(struct pcmcia_device *p_dev, | |||
524 | p_dev->io.BasePort1 = cf->io.win[0].base; | 524 | p_dev->io.BasePort1 = cf->io.win[0].base; |
525 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; | 525 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; |
526 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { | 526 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { |
527 | *base2 = p_dev->io.BasePort1 + 8; | 527 | *base2 = p_dev->resource[0]->start + 8; |
528 | return 0; | 528 | return 0; |
529 | } | 529 | } |
530 | } | 530 | } |
@@ -544,7 +544,7 @@ static int multi_config_check_notpicky(struct pcmcia_device *p_dev, | |||
544 | p_dev->io.BasePort2 = cf->io.win[1].base; | 544 | p_dev->io.BasePort2 = cf->io.win[1].base; |
545 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; | 545 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; |
546 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { | 546 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { |
547 | *base2 = p_dev->io.BasePort2; | 547 | *base2 = p_dev->resource[1]->start; |
548 | return 0; | 548 | return 0; |
549 | } | 549 | } |
550 | } | 550 | } |
@@ -596,9 +596,9 @@ static int multi_config(struct pcmcia_device *link) | |||
596 | link->conf.ConfigIndex == 3) { | 596 | link->conf.ConfigIndex == 3) { |
597 | err = setup_serial(link, info, base2, | 597 | err = setup_serial(link, info, base2, |
598 | link->irq); | 598 | link->irq); |
599 | base2 = link->io.BasePort1; | 599 | base2 = link->resource[0]->start;; |
600 | } else { | 600 | } else { |
601 | err = setup_serial(link, info, link->io.BasePort1, | 601 | err = setup_serial(link, info, link->resource[0]->start, |
602 | link->irq); | 602 | link->irq); |
603 | } | 603 | } |
604 | info->c950ctrl = base2; | 604 | info->c950ctrl = base2; |
@@ -613,7 +613,7 @@ static int multi_config(struct pcmcia_device *link) | |||
613 | return 0; | 613 | return 0; |
614 | } | 614 | } |
615 | 615 | ||
616 | setup_serial(link, info, link->io.BasePort1, link->irq); | 616 | setup_serial(link, info, link->resource[0]->start, link->irq); |
617 | for (i = 0; i < info->multi - 1; i++) | 617 | for (i = 0; i < info->multi - 1; i++) |
618 | setup_serial(link, info, base2 + (8 * i), | 618 | setup_serial(link, info, base2 + (8 * i), |
619 | link->irq); | 619 | link->irq); |