aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2006-12-13 05:46:38 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2009-11-28 12:01:26 -0500
commitf5560da549ea2e32dd41e36548c0e7dee3d4aabb (patch)
tree604c41db48ba2e497857ceb2137099d2f0d96d3b
parent78a14e273d93dfbea9673f9b10398c538096302d (diff)
pcmcia: Pass struct pcmcia_device to pcmcia_release_window()
No logic changes, just pass struct pcmcia_device to pcmcia_release_window(). [linux@dominikbrodowski.net: update to 2.6.31] CC: netdev@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/char/pcmcia/ipwireless/main.c14
-rw-r--r--drivers/mtd/maps/pcmciamtd.c2
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c4
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c2
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c4
-rw-r--r--drivers/net/wireless/ray_cs.c4
-rw-r--r--drivers/pcmcia/pcmcia_resource.c5
-rw-r--r--include/pcmcia/ds.h2
8 files changed, 19 insertions, 18 deletions
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 24bffa4ece49..91ca23d2b042 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -168,15 +168,15 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
168 return 0; 168 return 0;
169 169
170exit3: 170exit3:
171 pcmcia_release_window(ipw->handle_attr_memory); 171 pcmcia_release_window(p_dev, ipw->handle_attr_memory);
172exit2: 172exit2:
173 if (ipw->common_memory) { 173 if (ipw->common_memory) {
174 release_mem_region(ipw->request_common_memory.Base, 174 release_mem_region(ipw->request_common_memory.Base,
175 ipw->request_common_memory.Size); 175 ipw->request_common_memory.Size);
176 iounmap(ipw->common_memory); 176 iounmap(ipw->common_memory);
177 pcmcia_release_window(ipw->handle_common_memory); 177 pcmcia_release_window(p_dev, ipw->handle_common_memory);
178 } else 178 } else
179 pcmcia_release_window(ipw->handle_common_memory); 179 pcmcia_release_window(p_dev, ipw->handle_common_memory);
180exit1: 180exit1:
181 release_resource(io_resource); 181 release_resource(io_resource);
182 pcmcia_disable_device(p_dev); 182 pcmcia_disable_device(p_dev);
@@ -260,13 +260,13 @@ exit:
260 release_mem_region(ipw->request_attr_memory.Base, 260 release_mem_region(ipw->request_attr_memory.Base,
261 ipw->request_attr_memory.Size); 261 ipw->request_attr_memory.Size);
262 iounmap(ipw->attr_memory); 262 iounmap(ipw->attr_memory);
263 pcmcia_release_window(ipw->handle_attr_memory); 263 pcmcia_release_window(link, ipw->handle_attr_memory);
264 } 264 }
265 if (ipw->common_memory) { 265 if (ipw->common_memory) {
266 release_mem_region(ipw->request_common_memory.Base, 266 release_mem_region(ipw->request_common_memory.Base,
267 ipw->request_common_memory.Size); 267 ipw->request_common_memory.Size);
268 iounmap(ipw->common_memory); 268 iounmap(ipw->common_memory);
269 pcmcia_release_window(ipw->handle_common_memory); 269 pcmcia_release_window(link, ipw->handle_common_memory);
270 } 270 }
271 pcmcia_disable_device(link); 271 pcmcia_disable_device(link);
272 return -1; 272 return -1;
@@ -287,9 +287,9 @@ static void release_ipwireless(struct ipw_dev *ipw)
287 iounmap(ipw->attr_memory); 287 iounmap(ipw->attr_memory);
288 } 288 }
289 if (ipw->common_memory) 289 if (ipw->common_memory)
290 pcmcia_release_window(ipw->handle_common_memory); 290 pcmcia_release_window(ipw->link, ipw->handle_common_memory);
291 if (ipw->attr_memory) 291 if (ipw->attr_memory)
292 pcmcia_release_window(ipw->handle_attr_memory); 292 pcmcia_release_window(ipw->link, ipw->handle_attr_memory);
293 293
294 /* Break the link with Card Services */ 294 /* Break the link with Card Services */
295 pcmcia_disable_device(ipw->link); 295 pcmcia_disable_device(ipw->link);
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
index b698dbaaf9e6..16d9985aadcd 100644
--- a/drivers/mtd/maps/pcmciamtd.c
+++ b/drivers/mtd/maps/pcmciamtd.c
@@ -344,7 +344,7 @@ static void pcmciamtd_release(struct pcmcia_device *link)
344 iounmap(dev->win_base); 344 iounmap(dev->win_base);
345 dev->win_base = NULL; 345 dev->win_base = NULL;
346 } 346 }
347 pcmcia_release_window(link->win); 347 pcmcia_release_window(link, link->win);
348 } 348 }
349 pcmcia_disable_device(link); 349 pcmcia_disable_device(link);
350} 350}
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index fdec5c333a2a..61726c82be46 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -599,7 +599,7 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id)
599 } 599 }
600 600
601 iounmap(base); 601 iounmap(base);
602 j = pcmcia_release_window(link->win); 602 j = pcmcia_release_window(link, link->win);
603 return (i != 0x200) ? 0 : -1; 603 return (i != 0x200) ? 0 : -1;
604 604
605} /* fmvj18x_get_hwinfo */ 605} /* fmvj18x_get_hwinfo */
@@ -666,7 +666,7 @@ static void fmvj18x_release(struct pcmcia_device *link)
666 tmp = lp->base; 666 tmp = lp->base;
667 lp->base = NULL; /* set NULL before iounmap */ 667 lp->base = NULL; /* set NULL before iounmap */
668 iounmap(tmp); 668 iounmap(tmp);
669 j = pcmcia_release_window(link->win); 669 j = pcmcia_release_window(link, link->win);
670 } 670 }
671 671
672 pcmcia_disable_device(link); 672 pcmcia_disable_device(link);
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index 0d914f3b2941..7a985ca079d7 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -328,7 +328,7 @@ static void ibmtr_release(struct pcmcia_device *link)
328 if (link->win) { 328 if (link->win) {
329 struct tok_info *ti = netdev_priv(dev); 329 struct tok_info *ti = netdev_priv(dev);
330 iounmap(ti->mmio); 330 iounmap(ti->mmio);
331 pcmcia_release_window(info->sram_win_handle); 331 pcmcia_release_window(link, info->sram_win_handle);
332 } 332 }
333 pcmcia_disable_device(link); 333 pcmcia_disable_device(link);
334} 334}
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 80ab9de1c4df..4156a6c5811e 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -337,7 +337,7 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link)
337 } 337 }
338 338
339 iounmap(virt); 339 iounmap(virt);
340 j = pcmcia_release_window(link->win); 340 j = pcmcia_release_window(link, link->win);
341 return (i < NR_INFO) ? hw_info+i : NULL; 341 return (i < NR_INFO) ? hw_info+i : NULL;
342} /* get_hwinfo */ 342} /* get_hwinfo */
343 343
@@ -1513,7 +1513,7 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg,
1513 pcnet_reset_8390(dev); 1513 pcnet_reset_8390(dev);
1514 if (i != (TX_PAGES<<8)) { 1514 if (i != (TX_PAGES<<8)) {
1515 iounmap(info->base); 1515 iounmap(info->base);
1516 pcmcia_release_window(link->win); 1516 pcmcia_release_window(link, link->win);
1517 info->base = NULL; link->win = NULL; 1517 info->base = NULL; link->win = NULL;
1518 goto failed; 1518 goto failed;
1519 } 1519 }
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 28db7914a5d1..ed328750de45 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -820,10 +820,10 @@ static void ray_release(struct pcmcia_device *link)
820 iounmap(local->rmem); 820 iounmap(local->rmem);
821 iounmap(local->amem); 821 iounmap(local->amem);
822 /* Do bother checking to see if these succeed or not */ 822 /* Do bother checking to see if these succeed or not */
823 i = pcmcia_release_window(local->amem_handle); 823 i = pcmcia_release_window(link, local->amem_handle);
824 if (i != 0) 824 if (i != 0)
825 dev_dbg(&link->dev, "ReleaseWindow(local->amem) ret = %x\n", i); 825 dev_dbg(&link->dev, "ReleaseWindow(local->amem) ret = %x\n", i);
826 i = pcmcia_release_window(local->rmem_handle); 826 i = pcmcia_release_window(link, local->rmem_handle);
827 if (i != 0) 827 if (i != 0)
828 dev_dbg(&link->dev, "ReleaseWindow(local->rmem) ret = %x\n", i); 828 dev_dbg(&link->dev, "ReleaseWindow(local->rmem) ret = %x\n", i);
829 pcmcia_disable_device(link); 829 pcmcia_disable_device(link);
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index cda48ea9b6fd..820a6e5868e8 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -442,9 +442,10 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
442} /* pcmcia_release_irq */ 442} /* pcmcia_release_irq */
443 443
444 444
445int pcmcia_release_window(window_handle_t win) 445int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh)
446{ 446{
447 struct pcmcia_socket *s; 447 struct pcmcia_socket *s;
448 window_handle_t win = wh;
448 449
449 if ((win == NULL) || (win->magic != WINDOW_MAGIC)) 450 if ((win == NULL) || (win->magic != WINDOW_MAGIC))
450 return -EINVAL; 451 return -EINVAL;
@@ -891,7 +892,7 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) {
891 pcmcia_release_io(p_dev, &p_dev->io); 892 pcmcia_release_io(p_dev, &p_dev->io);
892 pcmcia_release_irq(p_dev, &p_dev->irq); 893 pcmcia_release_irq(p_dev, &p_dev->irq);
893 if (p_dev->win) 894 if (p_dev->win)
894 pcmcia_release_window(p_dev->win); 895 pcmcia_release_window(p_dev, p_dev->win);
895} 896}
896EXPORT_SYMBOL(pcmcia_disable_device); 897EXPORT_SYMBOL(pcmcia_disable_device);
897 898
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index d82392de4e92..40b098d7aa41 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -201,7 +201,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
201 201
202int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, 202int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req,
203 window_handle_t *wh); 203 window_handle_t *wh);
204int pcmcia_release_window(window_handle_t win); 204int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t win);
205 205
206int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); 206int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
207int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); 207int pcmcia_map_mem_page(window_handle_t win, memreq_t *req);