diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-11-14 15:25:35 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-05 18:03:20 -0500 |
commit | b463581154f3f3eecda27cae60df813fefcd84d3 (patch) | |
tree | 5e5b0f7a32b0727b64e52b9b2649897e6c841074 /drivers/net/wireless/hostap | |
parent | f3990715589d378a2d3aa9b8accd78bb4a2378b7 (diff) |
[PATCH] pcmcia: remove dev_list from drivers
The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/hostap')
-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; |