diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-28 04:59:06 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-09-29 11:20:21 -0400 |
commit | cdb138080b78146d1cdadba9f5dadbeb97445b91 (patch) | |
tree | fae26f709ed0f19648db79059234faf9fa028051 /drivers/net/wireless/b43/pcmcia.c | |
parent | 899611ee7d373e5eeda08e9a8632684e1ebbbf00 (diff) |
pcmcia: do not use win_req_t when calling pcmcia_request_window()
Instead of win_req_t, drivers are now requested to fill out
struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four iomem
ranges. After a call to pcmcia_request_window(), the windows found there
are reserved and may be used until pcmcia_release_window() is called.
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-mtd@lists.infradead.org
CC: Jiri Kosina <jkosina@suse.cz>
CC: linux-scsi@vger.kernel.org
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/b43/pcmcia.c')
-rw-r--r-- | drivers/net/wireless/b43/pcmcia.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index dfbc41d431ff..618d9b5c1054 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c | |||
@@ -63,7 +63,6 @@ static int b43_pcmcia_resume(struct pcmcia_device *dev) | |||
63 | static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | 63 | static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) |
64 | { | 64 | { |
65 | struct ssb_bus *ssb; | 65 | struct ssb_bus *ssb; |
66 | win_req_t win; | ||
67 | int err = -ENOMEM; | 66 | int err = -ENOMEM; |
68 | int res = 0; | 67 | int res = 0; |
69 | 68 | ||
@@ -76,16 +75,15 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
76 | dev->conf.Attributes = CONF_ENABLE_IRQ; | 75 | dev->conf.Attributes = CONF_ENABLE_IRQ; |
77 | dev->conf.IntType = INT_MEMORY_AND_IO; | 76 | dev->conf.IntType = INT_MEMORY_AND_IO; |
78 | 77 | ||
79 | win.Attributes = WIN_ENABLE | WIN_DATA_WIDTH_16 | | 78 | dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 | |
80 | WIN_USE_WAIT; | 79 | WIN_USE_WAIT; |
81 | win.Base = 0; | 80 | dev->resource[2]->start = 0; |
82 | win.Size = SSB_CORE_SIZE; | 81 | dev->resource[2]->end = SSB_CORE_SIZE; |
83 | win.AccessSpeed = 250; | 82 | res = pcmcia_request_window(dev, dev->resource[2], 250); |
84 | res = pcmcia_request_window(dev, &win, &dev->win); | ||
85 | if (res != 0) | 83 | if (res != 0) |
86 | goto err_kfree_ssb; | 84 | goto err_kfree_ssb; |
87 | 85 | ||
88 | res = pcmcia_map_mem_page(dev, dev->win, 0); | 86 | res = pcmcia_map_mem_page(dev, dev->resource[2], 0); |
89 | if (res != 0) | 87 | if (res != 0) |
90 | goto err_disable; | 88 | goto err_disable; |
91 | 89 | ||
@@ -96,7 +94,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
96 | if (res != 0) | 94 | if (res != 0) |
97 | goto err_disable; | 95 | goto err_disable; |
98 | 96 | ||
99 | err = ssb_bus_pcmciabus_register(ssb, dev, win.Base); | 97 | err = ssb_bus_pcmciabus_register(ssb, dev, dev->resource[2]->start); |
100 | if (err) | 98 | if (err) |
101 | goto err_disable; | 99 | goto err_disable; |
102 | dev->priv = ssb; | 100 | dev->priv = ssb; |