From b463581154f3f3eecda27cae60df813fefcd84d3 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Mon, 14 Nov 2005 21:25:35 +0100 Subject: [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 --- drivers/bluetooth/btuart_cs.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'drivers/bluetooth/btuart_cs.c') diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 63221d383fda..7b04f89f7a71 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c @@ -93,8 +93,6 @@ static dev_info_t dev_info = "btuart_cs"; static dev_link_t *btuart_attach(void); static void btuart_detach(struct pcmcia_device *p_dev); -static dev_link_t *dev_list = NULL; - /* Maximum baud rate */ #define SPEED_MAX 115200 @@ -610,8 +608,7 @@ static dev_link_t *btuart_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; client_reg.event_callback_args.client_data = link; @@ -631,22 +628,10 @@ static void btuart_detach(struct pcmcia_device *p_dev) { dev_link_t *link = dev_to_instance(p_dev); btuart_info_t *info = link->priv; - dev_link_t **linkp; - - /* Locate device structure */ - for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) - if (*linkp == link) - break; - - if (*linkp == NULL) - return; if (link->state & DEV_CONFIG) btuart_release(link); - /* Unlink device structure, free bits */ - *linkp = link->next; - kfree(info); } @@ -870,7 +855,6 @@ static int __init init_btuart_cs(void) static void __exit exit_btuart_cs(void) { pcmcia_unregister_driver(&btuart_driver); - BUG_ON(dev_list != NULL); } module_init(init_btuart_cs); -- cgit v1.2.1