diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-24 15:58:54 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-03 09:03:59 +0200 |
commit | 9a017a910346afd88ec2e065989903bf211a7d37 (patch) | |
tree | b407945c6e762f252bb81ae0fd64c745bba2ad11 /drivers/serial | |
parent | 2ce4905e4da9f512b38f56a53ece9da2072dd164 (diff) | |
download | blackbird-op-linux-9a017a910346afd88ec2e065989903bf211a7d37.tar.gz blackbird-op-linux-9a017a910346afd88ec2e065989903bf211a7d37.zip |
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) /* If the card is already configured, look up the port and irq */ if (link->function_config) { unsigned int port = 0; - if ((link->io.BasePort2 != 0) && - (link->io.NumPorts2 == 8)) { - port = link->io.BasePort2; + if ((link->resource[1]->end != 0) && + (resource_size(link->resource[1]) == 8)) { + port = link->resource[1]->end; info->slave = 1; } else if ((info->manfid == MANFID_OSITECH) && - (link->io.NumPorts1 == 0x40)) { - port = link->io.BasePort1 + 0x28; + (resource_size(link->resource[0]) == 0x40)) { + port = link->resource[0]->start + 0x28; info->slave = 1; } if (info->slave) { @@ -507,7 +507,7 @@ found_port: i = pcmcia_request_configuration(link, &link->conf); if (i != 0) return -1; - return setup_serial(link, info, link->io.BasePort1, link->irq); + return setup_serial(link, info, link->resource[0]->start, link->irq); } static int multi_config_check(struct pcmcia_device *p_dev, @@ -524,7 +524,7 @@ static int multi_config_check(struct pcmcia_device *p_dev, p_dev->io.BasePort1 = cf->io.win[0].base; p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; if (!pcmcia_request_io(p_dev, &p_dev->io)) { - *base2 = p_dev->io.BasePort1 + 8; + *base2 = p_dev->resource[0]->start + 8; return 0; } } @@ -544,7 +544,7 @@ static int multi_config_check_notpicky(struct pcmcia_device *p_dev, p_dev->io.BasePort2 = cf->io.win[1].base; p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; if (!pcmcia_request_io(p_dev, &p_dev->io)) { - *base2 = p_dev->io.BasePort2; + *base2 = p_dev->resource[1]->start; return 0; } } @@ -596,9 +596,9 @@ static int multi_config(struct pcmcia_device *link) link->conf.ConfigIndex == 3) { err = setup_serial(link, info, base2, link->irq); - base2 = link->io.BasePort1; + base2 = link->resource[0]->start;; } else { - err = setup_serial(link, info, link->io.BasePort1, + err = setup_serial(link, info, link->resource[0]->start, link->irq); } info->c950ctrl = base2; @@ -613,7 +613,7 @@ static int multi_config(struct pcmcia_device *link) return 0; } - setup_serial(link, info, link->io.BasePort1, link->irq); + setup_serial(link, info, link->resource[0]->start, link->irq); for (i = 0; i < info->multi - 1; i++) setup_serial(link, info, base2 + (8 * i), link->irq); |