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/wireless/hostap | |
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/wireless/hostap')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 18 |
1 files changed, 8 insertions, 10 deletions
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; |