aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/pcmcia/driver-changes.txt4
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c10
-rw-r--r--drivers/isdn/hisax/avma1_cs.c8
-rw-r--r--drivers/isdn/hisax/sedlbauer_cs.c8
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c10
-rw-r--r--drivers/net/wireless/orinoco_cs.c3
-rw-r--r--drivers/net/wireless/ray_cs.c8
-rw-r--r--drivers/net/wireless/spectrum_cs.c3
-rw-r--r--drivers/pcmcia/pcmcia_resource.c3
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c5
-rw-r--r--drivers/scsi/pcmcia/qlogic_stub.c7
-rw-r--r--drivers/telephony/ixj_pcmcia.c5
-rw-r--r--drivers/usb/host/sl811_cs.c14
-rw-r--r--include/pcmcia/cs.h2
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c4
-rw-r--r--sound/pcmcia/vx/vxpocket.c5
16 files changed, 31 insertions, 68 deletions
diff --git a/Documentation/pcmcia/driver-changes.txt b/Documentation/pcmcia/driver-changes.txt
index c89a5e29bb4c..4739c5c3face 100644
--- a/Documentation/pcmcia/driver-changes.txt
+++ b/Documentation/pcmcia/driver-changes.txt
@@ -3,8 +3,8 @@ This file details changes in 2.6 which affect PCMCIA card driver authors:
3* New release helper (as of 2.6.17) 3* New release helper (as of 2.6.17)
4 Instead of calling pcmcia_release_{configuration,io,irq,win}, all that's 4 Instead of calling pcmcia_release_{configuration,io,irq,win}, all that's
5 necessary now is calling pcmcia_disable_device. As there is no valid 5 necessary now is calling pcmcia_disable_device. As there is no valid
6 reason left to call pcmcia_release_io and pcmcia_release_irq, they will 6 reason left to call pcmcia_release_io and pcmcia_release_irq, the
7 be removed soon. 7 exports for them were removed.
8 8
9* Unify detach and REMOVAL event code, as well as attach and INSERTION 9* Unify detach and REMOVAL event code, as well as attach and INSERTION
10 code (as of 2.6.16) 10 code (as of 2.6.16)
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index f3889bdc8e43..5f70661994d8 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -284,25 +284,25 @@ found_port:
284 cs_error(link->handle, RequestIO, i); 284 cs_error(link->handle, RequestIO, i);
285 break; 285 break;
286 } 286 }
287 287
288 /* 288 /*
289 * allocate an interrupt line 289 * allocate an interrupt line
290 */ 290 */
291 i = pcmcia_request_irq(link->handle, &link->irq); 291 i = pcmcia_request_irq(link->handle, &link->irq);
292 if (i != CS_SUCCESS) { 292 if (i != CS_SUCCESS) {
293 cs_error(link->handle, RequestIRQ, i); 293 cs_error(link->handle, RequestIRQ, i);
294 pcmcia_release_io(link->handle, &link->io); 294 /* undo */
295 pcmcia_disable_device(link->handle);
295 break; 296 break;
296 } 297 }
297 298
298 /* 299 /*
299 * configure the PCMCIA socket 300 * configure the PCMCIA socket
300 */ 301 */
301 i = pcmcia_request_configuration(link->handle, &link->conf); 302 i = pcmcia_request_configuration(link->handle, &link->conf);
302 if (i != CS_SUCCESS) { 303 if (i != CS_SUCCESS) {
303 cs_error(link->handle, RequestConfiguration, i); 304 cs_error(link->handle, RequestConfiguration, i);
304 pcmcia_release_io(link->handle, &link->io); 305 pcmcia_disable_device(link->handle);
305 pcmcia_release_irq(link->handle, &link->irq);
306 break; 306 break;
307 } 307 }
308 308
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 729c2de0bc1d..845fa14e1bae 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -313,18 +313,18 @@ found_port:
313 i = pcmcia_request_irq(link->handle, &link->irq); 313 i = pcmcia_request_irq(link->handle, &link->irq);
314 if (i != CS_SUCCESS) { 314 if (i != CS_SUCCESS) {
315 cs_error(link->handle, RequestIRQ, i); 315 cs_error(link->handle, RequestIRQ, i);
316 pcmcia_release_io(link->handle, &link->io); 316 /* undo */
317 pcmcia_disable_device(link->handle);
317 break; 318 break;
318 } 319 }
319 320
320 /* 321 /*
321 * configure the PCMCIA socket 322 * configure the PCMCIA socket
322 */ 323 */
323 i = pcmcia_request_configuration(link->handle, &link->conf); 324 i = pcmcia_request_configuration(link->handle, &link->conf);
324 if (i != CS_SUCCESS) { 325 if (i != CS_SUCCESS) {
325 cs_error(link->handle, RequestConfiguration, i); 326 cs_error(link->handle, RequestConfiguration, i);
326 pcmcia_release_io(link->handle, &link->io); 327 pcmcia_disable_device(link->handle);
327 pcmcia_release_irq(link->handle, &link->irq);
328 break; 328 break;
329 } 329 }
330 330
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index e59539157d19..fd0f127e40ba 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -374,15 +374,11 @@ static void sedlbauer_config(dev_link_t *link)
374 } 374 }
375 /* If we got this far, we're cool! */ 375 /* If we got this far, we're cool! */
376 break; 376 break;
377 377
378 next_entry: 378 next_entry:
379/* new in dummy.cs 2001/01/28 MN
380 if (link->io.NumPorts1)
381 pcmcia_release_io(link->handle, &link->io);
382*/
383 CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(handle, &tuple)); 379 CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(handle, &tuple));
384 } 380 }
385 381
386 /* 382 /*
387 Allocate an interrupt line. Note that this does not assign a 383 Allocate an interrupt line. Note that this does not assign a
388 handler to the interrupt, unless the 'Handler' member of the 384 handler to the interrupt, unless the 'Handler' member of the
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 56700b154d44..03b1d8fbe7b7 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -49,6 +49,7 @@
49#include <pcmcia/cisreg.h> 49#include <pcmcia/cisreg.h>
50#include <pcmcia/ciscode.h> 50#include <pcmcia/ciscode.h>
51#include <pcmcia/ds.h> 51#include <pcmcia/ds.h>
52#include <pcmcia/ss.h>
52 53
53#include <asm/io.h> 54#include <asm/io.h>
54#include <asm/system.h> 55#include <asm/system.h>
@@ -965,10 +966,15 @@ static int check_sig(dev_link_t *link)
965 966
966 if (width) { 967 if (width) {
967 printk(KERN_INFO "smc91c92_cs: using 8-bit IO window.\n"); 968 printk(KERN_INFO "smc91c92_cs: using 8-bit IO window.\n");
969 /* call pcmcia_release_configuration() in _suspend */
968 smc91c92_suspend(link->handle); 970 smc91c92_suspend(link->handle);
969 pcmcia_release_io(link->handle, &link->io); 971
970 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 972 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
971 pcmcia_request_io(link->handle, &link->io); 973 link->handle->socket->io[0].res->flags &= ~IO_DATA_PATH_WIDTH;
974 link->handle->socket->io[0].res->flags |= IO_DATA_PATH_WIDTH_8;
975
976 /* call pcmcia_request_configuration() in _resume, it handles the
977 * flag update */
972 smc91c92_resume(link->handle); 978 smc91c92_resume(link->handle);
973 return check_sig(link); 979 return check_sig(link);
974 } 980 }
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index 7fdc4ff55107..0ce4165efc8f 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -317,8 +317,7 @@ orinoco_cs_config(dev_link_t *link)
317 break; 317 break;
318 318
319 next_entry: 319 next_entry:
320 if (link->io.NumPorts1) 320 pcmcia_disable_device(handle);
321 pcmcia_release_io(link->handle, &link->io);
322 last_ret = pcmcia_get_next_tuple(handle, &tuple); 321 last_ret = pcmcia_get_next_tuple(handle, &tuple);
323 if (last_ret == CS_NO_MORE_ITEMS) { 322 if (last_ret == CS_NO_MORE_ITEMS) {
324 printk(KERN_ERR PFX "GetNextTuple(): No matching " 323 printk(KERN_ERR PFX "GetNextTuple(): No matching "
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 7880d8c31aad..fc81ac67009d 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -849,22 +849,16 @@ static void ray_release(dev_link_t *link)
849 DEBUG(1, "ray_release(0x%p)\n", link); 849 DEBUG(1, "ray_release(0x%p)\n", link);
850 850
851 del_timer(&local->timer); 851 del_timer(&local->timer);
852 link->state &= ~DEV_CONFIG;
853 852
854 iounmap(local->sram); 853 iounmap(local->sram);
855 iounmap(local->rmem); 854 iounmap(local->rmem);
856 iounmap(local->amem); 855 iounmap(local->amem);
857 /* Do bother checking to see if these succeed or not */ 856 /* Do bother checking to see if these succeed or not */
858 i = pcmcia_release_window(link->win);
859 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(link->win) ret = %x\n",i);
860 i = pcmcia_release_window(local->amem_handle); 857 i = pcmcia_release_window(local->amem_handle);
861 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i); 858 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i);
862 i = pcmcia_release_window(local->rmem_handle); 859 i = pcmcia_release_window(local->rmem_handle);
863 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i); 860 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i);
864 i = pcmcia_release_configuration(link->handle); 861 pcmcia_disable_device(link->handle);
865 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseConfiguration ret = %x\n",i);
866 i = pcmcia_release_irq(link->handle, &link->irq);
867 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseIRQ ret = %x\n",i);
868 862
869 DEBUG(2,"ray_release ending\n"); 863 DEBUG(2,"ray_release ending\n");
870} 864}
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index 78320c1a1c15..b7ed99f8d319 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -790,8 +790,7 @@ spectrum_cs_config(dev_link_t *link)
790 break; 790 break;
791 791
792 next_entry: 792 next_entry:
793 if (link->io.NumPorts1) 793 pcmcia_disable_device(handle);
794 pcmcia_release_io(link->handle, &link->io);
795 last_ret = pcmcia_get_next_tuple(handle, &tuple); 794 last_ret = pcmcia_get_next_tuple(handle, &tuple);
796 if (last_ret == CS_NO_MORE_ITEMS) { 795 if (last_ret == CS_NO_MORE_ITEMS) {
797 printk(KERN_ERR PFX "GetNextTuple(): No matching " 796 printk(KERN_ERR PFX "GetNextTuple(): No matching "
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 555c8698ebd9..f4dcea6ac44b 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -514,7 +514,6 @@ int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req)
514 514
515 return CS_SUCCESS; 515 return CS_SUCCESS;
516} /* pcmcia_release_io */ 516} /* pcmcia_release_io */
517EXPORT_SYMBOL(pcmcia_release_io);
518 517
519 518
520int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req) 519int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
@@ -547,7 +546,6 @@ int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
547 546
548 return CS_SUCCESS; 547 return CS_SUCCESS;
549} /* pcmcia_release_irq */ 548} /* pcmcia_release_irq */
550EXPORT_SYMBOL(pcmcia_release_irq);
551 549
552 550
553int pcmcia_release_window(window_handle_t win) 551int pcmcia_release_window(window_handle_t win)
@@ -937,6 +935,5 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) {
937 pcmcia_release_window(p_dev->instance->win); 935 pcmcia_release_window(p_dev->instance->win);
938 936
939 p_dev->instance->dev = NULL; 937 p_dev->instance->dev = NULL;
940 p_dev->instance->state &= ~DEV_CONFIG;
941} 938}
942EXPORT_SYMBOL(pcmcia_disable_device); 939EXPORT_SYMBOL(pcmcia_disable_device);
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index dd383c538d98..d469e0d16224 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1802,10 +1802,7 @@ static void nsp_cs_config(dev_link_t *link)
1802 1802
1803 next_entry: 1803 next_entry:
1804 nsp_dbg(NSP_DEBUG_INIT, "next"); 1804 nsp_dbg(NSP_DEBUG_INIT, "next");
1805 1805 pcmcia_disable_device(handle);
1806 if (link->io.NumPorts1) {
1807 pcmcia_release_io(link->handle, &link->io);
1808 }
1809 CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(handle, &tuple)); 1806 CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(handle, &tuple));
1810 } 1807 }
1811 1808
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
index 70269fc10f30..1e27059cd462 100644
--- a/drivers/scsi/pcmcia/qlogic_stub.c
+++ b/drivers/scsi/pcmcia/qlogic_stub.c
@@ -288,12 +288,7 @@ out:
288 288
289cs_failed: 289cs_failed:
290 cs_error(link->handle, last_fn, last_ret); 290 cs_error(link->handle, last_fn, last_ret);
291 link->dev = NULL; 291 pcmcia_disable_device(link->handle);
292
293 pcmcia_release_configuration(link->handle);
294 pcmcia_release_io(link->handle, &link->io);
295 pcmcia_release_irq(link->handle, &link->irq);
296 link->state &= ~DEV_CONFIG;
297 return; 292 return;
298 293
299} /* qlogic_config */ 294} /* qlogic_config */
diff --git a/drivers/telephony/ixj_pcmcia.c b/drivers/telephony/ixj_pcmcia.c
index d3a7b0c3d38b..fe3cde0da84a 100644
--- a/drivers/telephony/ixj_pcmcia.c
+++ b/drivers/telephony/ixj_pcmcia.c
@@ -229,10 +229,7 @@ static void ixj_cs_release(dev_link_t *link)
229 ixj_info_t *info = link->priv; 229 ixj_info_t *info = link->priv;
230 DEBUG(0, "ixj_cs_release(0x%p)\n", link); 230 DEBUG(0, "ixj_cs_release(0x%p)\n", link);
231 info->ndev = 0; 231 info->ndev = 0;
232 link->dev = NULL; 232 pcmcia_disable_device(link->handle);
233 pcmcia_release_configuration(link->handle);
234 pcmcia_release_io(link->handle, &link->io);
235 link->state &= ~DEV_CONFIG;
236} 233}
237 234
238static int ixj_suspend(struct pcmcia_device *dev) 235static int ixj_suspend(struct pcmcia_device *dev)
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 134d2000128a..ee811673d903 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -154,19 +154,10 @@ static void sl811_cs_detach(struct pcmcia_device *p_dev)
154 154
155static void sl811_cs_release(dev_link_t * link) 155static void sl811_cs_release(dev_link_t * link)
156{ 156{
157
158 DBG(0, "sl811_cs_release(0x%p)\n", link); 157 DBG(0, "sl811_cs_release(0x%p)\n", link);
159 158
160 /* Unlink the device chain */ 159 pcmcia_disable_device(link->handle);
161 link->dev = NULL;
162
163 platform_device_unregister(&platform_dev); 160 platform_device_unregister(&platform_dev);
164 pcmcia_release_configuration(link->handle);
165 if (link->io.NumPorts1)
166 pcmcia_release_io(link->handle, &link->io);
167 if (link->irq.AssignedIRQ)
168 pcmcia_release_irq(link->handle, &link->irq);
169 link->state &= ~DEV_CONFIG;
170} 161}
171 162
172static void sl811_cs_config(dev_link_t *link) 163static void sl811_cs_config(dev_link_t *link)
@@ -260,8 +251,7 @@ static void sl811_cs_config(dev_link_t *link)
260 break; 251 break;
261 252
262next_entry: 253next_entry:
263 if (link->io.NumPorts1) 254 pcmcia_disable_device(handle);
264 pcmcia_release_io(link->handle, &link->io);
265 last_ret = pcmcia_get_next_tuple(handle, &tuple); 255 last_ret = pcmcia_get_next_tuple(handle, &tuple);
266 } 256 }
267 257
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index a5d8df24d56c..7b915200c116 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -379,8 +379,6 @@ int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
379int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); 379int pcmcia_map_mem_page(window_handle_t win, memreq_t *req);
380int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); 380int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod);
381int pcmcia_release_configuration(struct pcmcia_device *p_dev); 381int pcmcia_release_configuration(struct pcmcia_device *p_dev);
382int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req);
383int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req);
384int pcmcia_release_window(window_handle_t win); 382int pcmcia_release_window(window_handle_t win);
385int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req); 383int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req);
386int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); 384int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req);
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index a2d3eb47f83c..80c53553b815 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -273,9 +273,7 @@ static void pdacf_config(dev_link_t *link)
273cs_failed: 273cs_failed:
274 cs_error(link->handle, last_fn, last_ret); 274 cs_error(link->handle, last_fn, last_ret);
275failed: 275failed:
276 pcmcia_release_configuration(link->handle); 276 pcmcia_disable_device(link->handle);
277 pcmcia_release_io(link->handle, &link->io);
278 pcmcia_release_irq(link->handle, &link->irq);
279} 277}
280 278
281#ifdef CONFIG_PM 279#ifdef CONFIG_PM
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 92788744bc48..8093e5044956 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -272,10 +272,7 @@ static void vxpocket_config(dev_link_t *link)
272cs_failed: 272cs_failed:
273 cs_error(link->handle, last_fn, last_ret); 273 cs_error(link->handle, last_fn, last_ret);
274failed: 274failed:
275 pcmcia_release_configuration(link->handle); 275 pcmcia_disable_device(link->handle);
276 pcmcia_release_io(link->handle, &link->io);
277 pcmcia_release_irq(link->handle, &link->irq);
278 link->state &= ~DEV_CONFIG;
279 kfree(parse); 276 kfree(parse);
280} 277}
281 278