aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_cs.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 866142af7d92..195a5bf3d725 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -25,7 +25,6 @@
25 25
26static char *version = PRISM2_VERSION " (Jouni Malinen <jkmaline@cc.hut.fi>)"; 26static char *version = PRISM2_VERSION " (Jouni Malinen <jkmaline@cc.hut.fi>)";
27static dev_info_t dev_info = "hostap_cs"; 27static dev_info_t dev_info = "hostap_cs";
28static dev_link_t *dev_list = NULL;
29 28
30MODULE_AUTHOR("Jouni Malinen"); 29MODULE_AUTHOR("Jouni Malinen");
31MODULE_DESCRIPTION("Support for Intersil Prism2-based 802.11 wireless LAN " 30MODULE_DESCRIPTION("Support for Intersil Prism2-based 802.11 wireless LAN "
@@ -520,8 +519,7 @@ static dev_link_t *prism2_attach(void)
520 link->conf.IntType = INT_MEMORY_AND_IO; 519 link->conf.IntType = INT_MEMORY_AND_IO;
521 520
522 /* register with CardServices */ 521 /* register with CardServices */
523 link->next = dev_list; 522 link->next = NULL;
524 dev_list = link;
525 client_reg.dev_info = &dev_info; 523 client_reg.dev_info = &dev_info;
526 client_reg.Version = 0x0210; 524 client_reg.Version = 0x0210;
527 client_reg.event_callback_args.client_data = link; 525 client_reg.event_callback_args.client_data = link;
@@ -538,24 +536,13 @@ static dev_link_t *prism2_attach(void)
538static void prism2_detach(struct pcmcia_device *p_dev) 536static void prism2_detach(struct pcmcia_device *p_dev)
539{ 537{
540 dev_link_t *link = dev_to_instance(p_dev); 538 dev_link_t *link = dev_to_instance(p_dev);
541 dev_link_t **linkp;
542 539
543 PDEBUG(DEBUG_FLOW, "prism2_detach\n"); 540 PDEBUG(DEBUG_FLOW, "prism2_detach\n");
544 541
545 for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
546 if (*linkp == link)
547 break;
548 if (*linkp == NULL) {
549 printk(KERN_WARNING "%s: Attempt to detach non-existing "
550 "PCMCIA client\n", dev_info);
551 return;
552 }
553
554 if (link->state & DEV_CONFIG) { 542 if (link->state & DEV_CONFIG) {
555 prism2_release((u_long)link); 543 prism2_release((u_long)link);
556 } 544 }
557 545
558 *linkp = link->next;
559 /* release net devices */ 546 /* release net devices */
560 if (link->priv) { 547 if (link->priv) {
561 struct hostap_cs_priv *hw_priv; 548 struct hostap_cs_priv *hw_priv;