diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-11-14 23:25:35 +0300 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-06 02:03:20 +0300 |
commit | b463581154f3f3eecda27cae60df813fefcd84d3 (patch) | |
tree | 5e5b0f7a32b0727b64e52b9b2649897e6c841074 /drivers/telephony | |
parent | f3990715589d378a2d3aa9b8accd78bb4a2378b7 (diff) | |
download | linux-b463581154f3f3eecda27cae60df813fefcd84d3.tar.xz |
[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/telephony')
-rw-r--r-- | drivers/telephony/ixj_pcmcia.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/telephony/ixj_pcmcia.c b/drivers/telephony/ixj_pcmcia.c index c58140dc7a73..6b992985d782 100644 --- a/drivers/telephony/ixj_pcmcia.c +++ b/drivers/telephony/ixj_pcmcia.c @@ -40,7 +40,6 @@ static void ixj_config(dev_link_t * link); static void ixj_cs_release(dev_link_t * link); static int ixj_event(event_t event, int priority, event_callback_args_t * args); static dev_info_t dev_info = "ixj_cs"; -static dev_link_t *dev_list = NULL; static dev_link_t *ixj_attach(void) { @@ -65,8 +64,7 @@ static dev_link_t *ixj_attach(void) } memset(link->priv, 0, sizeof(struct ixj_info_t)); /* Register with Card Services */ - link->next = dev_list; - dev_list = link; + link->next = NULL; client_reg.dev_info = &dev_info; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -82,20 +80,13 @@ static dev_link_t *ixj_attach(void) static void ixj_detach(struct pcmcia_device *p_dev) { dev_link_t *link = dev_to_instance(p_dev); - dev_link_t **linkp; DEBUG(0, "ixj_detach(0x%p)\n", link); - for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) - if (*linkp == link) - break; - if (*linkp == NULL) - return; + link->state &= ~DEV_RELEASE_PENDING; if (link->state & DEV_CONFIG) ixj_cs_release(link); - /* Unlink device structure, free bits */ - *linkp = link->next; kfree(link->priv); kfree(link); } @@ -314,7 +305,6 @@ static int __init ixj_pcmcia_init(void) static void ixj_pcmcia_exit(void) { pcmcia_unregister_driver(&ixj_driver); - BUG_ON(dev_list != NULL); } module_init(ixj_pcmcia_init); |