diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-15 04:05:19 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:15:51 -0500 |
commit | 50db3fdbbc98260fb538c1cc3f8cc597ba7bffe7 (patch) | |
tree | a3cd6076787d9c55467fcc598c997726315f80d1 /drivers | |
parent | 5f2a71fcb7995633b335a1e380ac63a968e61320 (diff) |
[PATCH] pcmcia: convert remaining users of pcmcia_release_io and _irq
Convert the remaining drivers which use pcmcia_release_io or
pcmcia_release_irq, and remove the EXPORT of these symbols.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/isdn/hardware/avm/avm_cs.c | 10 | ||||
-rw-r--r-- | drivers/isdn/hisax/avma1_cs.c | 8 | ||||
-rw-r--r-- | drivers/isdn/hisax/sedlbauer_cs.c | 8 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco_cs.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/spectrum_cs.c | 3 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 3 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 5 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/qlogic_stub.c | 7 | ||||
-rw-r--r-- | drivers/telephony/ixj_pcmcia.c | 5 | ||||
-rw-r--r-- | drivers/usb/host/sl811_cs.c | 14 |
12 files changed, 27 insertions, 57 deletions
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 */ |
517 | EXPORT_SYMBOL(pcmcia_release_io); | ||
518 | 517 | ||
519 | 518 | ||
520 | int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req) | 519 | int 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 */ |
550 | EXPORT_SYMBOL(pcmcia_release_irq); | ||
551 | 549 | ||
552 | 550 | ||
553 | int pcmcia_release_window(window_handle_t win) | 551 | int 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 | } |
942 | EXPORT_SYMBOL(pcmcia_disable_device); | 939 | EXPORT_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 | ||
289 | cs_failed: | 289 | cs_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 | ||
238 | static int ixj_suspend(struct pcmcia_device *dev) | 235 | static 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 | ||
155 | static void sl811_cs_release(dev_link_t * link) | 155 | static 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 | ||
172 | static void sl811_cs_config(dev_link_t *link) | 163 | static 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 | ||
262 | next_entry: | 253 | next_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 | ||