summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial_cs.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index a9536636650..6e7a1a0ae01 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -122,8 +122,6 @@ static dev_info_t dev_info = "serial_cs";
static dev_link_t *serial_attach(void);
static void serial_detach(struct pcmcia_device *p_dev);
-static dev_link_t *dev_list = NULL;
-
/*======================================================================
After a card is removed, serial_remove() will unregister
@@ -234,8 +232,7 @@ static dev_link_t *serial_attach(void)
link->conf.IntType = INT_MEMORY_AND_IO;
/* Register with Card Services */
- link->next = dev_list;
- dev_list = link;
+ link->next = NULL; /* not needed */
client_reg.dev_info = &dev_info;
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
@@ -262,17 +259,9 @@ static void serial_detach(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
struct serial_info *info = link->priv;
- dev_link_t **linkp;
DEBUG(0, "serial_detach(0x%p)\n", link);
- /* Locate device structure */
- for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
- if (*linkp == link)
- break;
- if (*linkp == NULL)
- return;
-
/*
* Ensure any outstanding scheduled tasks are completed.
*/
@@ -283,8 +272,7 @@ static void serial_detach(struct pcmcia_device *p_dev)
*/
serial_remove(link);
- /* Unlink device structure, free bits */
- *linkp = link->next;
+ /* free bits */
kfree(info);
}
@@ -871,7 +859,6 @@ static int __init init_serial_cs(void)
static void __exit exit_serial_cs(void)
{
pcmcia_unregister_driver(&serial_cs_driver);
- BUG_ON(dev_list != NULL);
}
module_init(init_serial_cs);