summaryrefslogtreecommitdiff
path: root/drivers/char/pcmcia/synclink_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/char/pcmcia/synclink_cs.c
parentf3990715589d378a2d3aa9b8accd78bb4a2378b7 (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/char/pcmcia/synclink_cs.c')
-rw-r--r--drivers/char/pcmcia/synclink_cs.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 34597144d9c1..dc38b1d0a725 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -492,7 +492,6 @@ static dev_link_t *mgslpc_attach(void);
static void mgslpc_detach(struct pcmcia_device *p_dev);
static dev_info_t dev_info = "synclink_cs";
-static dev_link_t *dev_list = NULL;
/*
* 1st function defined in .text section. Calling this function in
@@ -588,8 +587,7 @@ static dev_link_t *mgslpc_attach(void)
link->conf.IntType = INT_MEMORY_AND_IO;
/* Register with Card Services */
- link->next = dev_list;
- dev_list = link;
+ link->next = NULL;
client_reg.dev_info = &dev_info;
client_reg.Version = 0x0210;
@@ -741,24 +739,15 @@ static void mgslpc_release(u_long arg)
static void mgslpc_detach(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
- dev_link_t **linkp;
if (debug_level >= DEBUG_LEVEL_INFO)
printk("mgslpc_detach(0x%p)\n", link);
- /* find device */
- for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
- if (*linkp == link) break;
- if (*linkp == NULL)
- return;
-
if (link->state & DEV_CONFIG) {
((MGSLPC_INFO *)link->priv)->stop = 1;
mgslpc_release((u_long)link);
}
- /* Unlink device structure, and free it */
- *linkp = link->next;
mgslpc_remove_device((MGSLPC_INFO *)link->priv);
}
@@ -3131,7 +3120,6 @@ static void synclink_cs_cleanup(void)
}
pcmcia_unregister_driver(&mgslpc_driver);
- BUG_ON(dev_list != NULL);
}
static int __init synclink_cs_init(void)