aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-28 03:32:02 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-08-03 03:04:21 -0400
commit0f52e86ded65749c6037473013ad77b2afa4f68d (patch)
treeac5bb89a3d3187d5640e538a5aa9b414ea18a0c5 /drivers/isdn
parentad0c7be28bc7593da43f494f6d074767ea96ca59 (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/isdn')
-rw-r--r--drivers/isdn/hisax/sedlbauer_cs.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 0b06dbb2d52d..a024192b672a 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -171,8 +171,6 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
171 unsigned int vcc, 171 unsigned int vcc,
172 void *priv_data) 172 void *priv_data)
173{ 173{
174 win_req_t *req = priv_data;
175
176 if (cfg->index == 0) 174 if (cfg->index == 0)
177 return -ENODEV; 175 return -ENODEV;
178 176
@@ -219,31 +217,6 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
219 return -ENODEV; 217 return -ENODEV;
220 } 218 }
221 219
222 /*
223 Now set up a common memory window, if needed. There is room
224 in the struct pcmcia_device structure for one memory window handle,
225 but if the base addresses need to be saved, or if multiple
226 windows are needed, the info should go in the private data
227 structure for this device.
228
229 Note that the memory window base is a physical address, and
230 needs to be mapped to virtual space with ioremap() before it
231 is used.
232 */
233 if ((cfg->mem.nwin > 0) || (dflt->mem.nwin > 0)) {
234 cistpl_mem_t *mem = (cfg->mem.nwin) ? &cfg->mem : &dflt->mem;
235 req->Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM;
236 req->Attributes |= WIN_ENABLE;
237 req->Base = mem->win[0].host_addr;
238 req->Size = mem->win[0].len;
239 req->AccessSpeed = 0;
240 if (pcmcia_request_window(p_dev, req, &p_dev->win) != 0)
241 return -ENODEV;
242
243 if (pcmcia_map_mem_page(p_dev, p_dev->win,
244 mem->win[0].card_addr) != 0)
245 return -ENODEV;
246 }
247 return 0; 220 return 0;
248} 221}
249 222
@@ -251,16 +224,11 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
251 224
252static int __devinit sedlbauer_config(struct pcmcia_device *link) 225static int __devinit sedlbauer_config(struct pcmcia_device *link)
253{ 226{
254 win_req_t *req;
255 int ret; 227 int ret;
256 IsdnCard_t icard; 228 IsdnCard_t icard;
257 229
258 dev_dbg(&link->dev, "sedlbauer_config(0x%p)\n", link); 230 dev_dbg(&link->dev, "sedlbauer_config(0x%p)\n", link);
259 231
260 req = kzalloc(sizeof(win_req_t), GFP_KERNEL);
261 if (!req)
262 return -ENOMEM;
263
264 /* 232 /*
265 In this loop, we scan the CIS for configuration table entries, 233 In this loop, we scan the CIS for configuration table entries,
266 each of which describes a valid card configuration, including 234 each of which describes a valid card configuration, including
@@ -273,7 +241,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
273 these things without consulting the CIS, and most client drivers 241 these things without consulting the CIS, and most client drivers
274 will only use the CIS to fill in implementation-defined details. 242 will only use the CIS to fill in implementation-defined details.
275 */ 243 */
276 ret = pcmcia_loop_config(link, sedlbauer_config_check, req); 244 ret = pcmcia_loop_config(link, sedlbauer_config_check, NULL);
277 if (ret) 245 if (ret)
278 goto failed; 246 goto failed;
279 247
@@ -297,9 +265,6 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
297 printk(" & %pR", link->resource[0]); 265 printk(" & %pR", link->resource[0]);
298 if (link->resource[1]) 266 if (link->resource[1])
299 printk(" & %pR", link->resource[1]); 267 printk(" & %pR", link->resource[1]);
300 if (link->win)
301 printk(", mem 0x%06lx-0x%06lx", req->Base,
302 req->Base+req->Size-1);
303 printk("\n"); 268 printk("\n");
304 269
305 icard.para[0] = link->irq; 270 icard.para[0] = link->irq;