diff options
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_cs.c')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 15 |
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 | ||
26 | static char *version = PRISM2_VERSION " (Jouni Malinen <jkmaline@cc.hut.fi>)"; | 26 | static char *version = PRISM2_VERSION " (Jouni Malinen <jkmaline@cc.hut.fi>)"; |
27 | static dev_info_t dev_info = "hostap_cs"; | 27 | static dev_info_t dev_info = "hostap_cs"; |
28 | static dev_link_t *dev_list = NULL; | ||
29 | 28 | ||
30 | MODULE_AUTHOR("Jouni Malinen"); | 29 | MODULE_AUTHOR("Jouni Malinen"); |
31 | MODULE_DESCRIPTION("Support for Intersil Prism2-based 802.11 wireless LAN " | 30 | MODULE_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) | |||
538 | static void prism2_detach(struct pcmcia_device *p_dev) | 536 | static 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; |