summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/avma1_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-11-14 21:25:35 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-01-06 00:03:20 +0100
commitb463581154f3f3eecda27cae60df813fefcd84d3 (patch)
tree5e5b0f7a32b0727b64e52b9b2649897e6c841074 /drivers/isdn/hisax/avma1_cs.c
parent[PATCH] pcmcia: remove old detach mechanism (diff)
downloadlinux-b463581154f3f3eecda27cae60df813fefcd84d3.tar.xz
linux-b463581154f3f3eecda27cae60df813fefcd84d3.zip
[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/isdn/hisax/avma1_cs.c')
-rw-r--r--drivers/isdn/hisax/avma1_cs.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 6b322e88c6c3..b6ea653f881e 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -99,15 +99,7 @@ static dev_info_t dev_info = "avma1_cs";
device numbers are used to derive the corresponding array index.
*/
-static dev_link_t *dev_list = NULL;
-
/*
- A dev_link_t structure has fields for most things that are needed
- to keep track of a socket, but there will usually be some device
- specific information that also needs to be kept track of. The
- 'priv' pointer in a dev_link_t structure can be used to point to
- a device-specific private data structure, like this.
-
A driver needs to provide a dev_node_t structure for each device
on a card. In some cases, there is only one device per card (for
example, ethernet cards, modems). In other cases, there may be
@@ -179,8 +171,7 @@ static dev_link_t *avma1cs_attach(void)
link->conf.Present = PRESENT_OPTION;
/* 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;
@@ -206,21 +197,12 @@ static dev_link_t *avma1cs_attach(void)
static void avma1cs_detach(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
- dev_link_t **linkp;
DEBUG(0, "avma1cs_detach(0x%p)\n", link);
- /* Locate device structure */
- for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
- if (*linkp == link) break;
- if (*linkp == NULL)
- return;
-
if (link->state & DEV_CONFIG)
avma1cs_release(link);
- /* Unlink device structure, free pieces */
- *linkp = link->next;
kfree(link->priv);
kfree(link);
} /* avma1cs_detach */
@@ -508,7 +490,6 @@ static int __init init_avma1_cs(void)
static void __exit exit_avma1_cs(void)
{
pcmcia_unregister_driver(&avma1cs_driver);
- BUG_ON(dev_list != NULL);
}
module_init(init_avma1_cs);