aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
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/wireless
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/wireless')
-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
7 files changed, 24 insertions, 27 deletions
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");