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/staging/comedi/drivers/ni_labpc_cs.c | |
parent | ad0c7be28bc7593da43f494f6d074767ea96ca59 (diff) |
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/staging/comedi/drivers/ni_labpc_cs.c')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc_cs.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index 94d9f7fe6f2c..f204961e0786 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c @@ -285,8 +285,6 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev, unsigned int vcc, void *priv_data) { - win_req_t *req = priv_data; - if (cfg->index == 0) return -ENODEV; @@ -319,22 +317,6 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev, return -ENODEV; } - 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->Attributes |= WIN_ENABLE; - req->Base = mem->win[0].host_addr; - req->Size = mem->win[0].len; - if (req->Size < 0x1000) - req->Size = 0x1000; - req->AccessSpeed = 0; - if (pcmcia_request_window(p_dev, req, &p_dev->win)) - return -ENODEV; - if (pcmcia_map_mem_page(p_dev, p_dev->win, - mem->win[0].card_addr)) - return -ENODEV; - } /* If we got this far, we're cool! */ return 0; } @@ -343,11 +325,10 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev, static void labpc_config(struct pcmcia_device *link) { int ret; - win_req_t req; dev_dbg(&link->dev, "labpc_config\n"); - ret = pcmcia_loop_config(link, labpc_pcmcia_config_loop, &req); + ret = pcmcia_loop_config(link, labpc_pcmcia_config_loop, NULL); if (ret) { dev_warn(&link->dev, "no configuration found\n"); goto failed; @@ -373,9 +354,6 @@ static void labpc_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"); return; |