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/net/wireless/orinoco_cs.c | |
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/net/wireless/orinoco_cs.c')
-rw-r--r-- | drivers/net/wireless/orinoco_cs.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index 00679b6c87c1..bfeeef49f0b3 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c @@ -69,12 +69,6 @@ struct orinoco_pccard { unsigned long hard_reset_in_progress; }; -/* - * A linked list of "instances" of the device. Each actual PCMCIA - * card corresponds to one device instance, and is described by one - * dev_link_t structure (defined in ds.h). - */ -static dev_link_t *dev_list; /* = NULL */ /********************************************************************/ /* Function prototypes */ @@ -154,9 +148,7 @@ orinoco_cs_attach(void) link->conf.IntType = INT_MEMORY_AND_IO; /* Register with Card Services */ - /* FIXME: need a lock? */ - link->next = dev_list; - dev_list = link; + link->next = NULL; client_reg.dev_info = &dev_info; client_reg.Version = 0x0210; /* FIXME: what does this mean? */ @@ -181,21 +173,11 @@ orinoco_cs_attach(void) static void orinoco_cs_detach(struct pcmcia_device *p_dev) { dev_link_t *link = dev_to_instance(p_dev); - dev_link_t **linkp; struct net_device *dev = link->priv; - /* Locate device structure */ - for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) - if (*linkp == link) - break; - - BUG_ON(*linkp == NULL); - if (link->state & DEV_CONFIG) orinoco_cs_release(link); - /* Unlink device structure, and free it */ - *linkp = link->next; DEBUG(0, PFX "detach: link=%p link->dev=%p\n", link, link->dev); if (link->dev) { DEBUG(0, PFX "About to unregister net device %p\n", @@ -678,7 +660,6 @@ static void __exit exit_orinoco_cs(void) { pcmcia_unregister_driver(&orinoco_driver); - BUG_ON(dev_list != NULL); } module_init(init_orinoco_cs); |