diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-28 09:32:02 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-03 09:04:21 +0200 |
commit | 0f52e86ded65749c6037473013ad77b2afa4f68d (patch) | |
tree | ac5bb89a3d3187d5640e538a5aa9b414ea18a0c5 /drivers/net | |
parent | ad0c7be28bc7593da43f494f6d074767ea96ca59 (diff) | |
download | blackbird-op-linux-0f52e86ded65749c6037473013ad77b2afa4f68d.tar.gz blackbird-op-linux-0f52e86ded65749c6037473013ad77b2afa4f68d.zip |
pcmcia: do not request windows if you don't need to
Several drivers contained dummy code to request for memory windows,
even though they never made use of it. Remove all such code
snippets.
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/airo_cs.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index d47672cb4196..9a121a5b787c 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c @@ -154,8 +154,6 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev, unsigned int vcc, void *priv_data) { - win_req_t *req = priv_data; - if (cfg->index == 0) return -ENODEV; @@ -194,29 +192,6 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev, if (pcmcia_request_io(p_dev) != 0) return -ENODEV; - /* - Now set up a common memory window, if needed. There is room - in the struct pcmcia_device structure for one memory window handle, - but if the base addresses need to be saved, or if multiple - windows are needed, the info should go in the private data - structure for this device. - - Note that the memory window base is a physical address, and - needs to be mapped to virtual space with ioremap() before it - is used. - */ - if ((cfg->mem.nwin > 0) || (dflt->mem.nwin > 0)) { - cistpl_mem_t *mem = (cfg->mem.nwin) ? &cfg->mem : &dflt->mem; - req->Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM; - req->Base = mem->win[0].host_addr; - req->Size = mem->win[0].len; - req->AccessSpeed = 0; - if (pcmcia_request_window(p_dev, req, &p_dev->win) != 0) - return -ENODEV; - if (pcmcia_map_mem_page(p_dev, p_dev->win, - mem->win[0].card_addr) != 0) - return -ENODEV; - } /* If we got this far, we're cool! */ return 0; } @@ -225,17 +200,12 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev, static int airo_config(struct pcmcia_device *link) { local_info_t *dev; - win_req_t *req; int ret; dev = link->priv; dev_dbg(&link->dev, "airo_config\n"); - req = kzalloc(sizeof(win_req_t), GFP_KERNEL); - if (!req) - return -ENOMEM; - /* * In this loop, we scan the CIS for configuration table * entries, each of which describes a valid card @@ -250,7 +220,7 @@ static int airo_config(struct pcmcia_device *link) * and most client drivers will only use the CIS to fill in * implementation-defined details. */ - ret = pcmcia_loop_config(link, airo_cs_config_check, req); + ret = pcmcia_loop_config(link, airo_cs_config_check, NULL); if (ret) goto failed; @@ -281,16 +251,11 @@ static int airo_config(struct pcmcia_device *link) printk(" & %pR", link->resource[0]); if (link->resource[1]) printk(" & %pR", link->resource[1]); - if (link->win) - printk(", mem 0x%06lx-0x%06lx", req->Base, - req->Base+req->Size-1); printk("\n"); - kfree(req); return 0; failed: airo_release(link); - kfree(req); return -ENODEV; } /* airo_config */ |