aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/dtl1_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-11-14 15:25:35 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-01-05 18:03:20 -0500
commitb463581154f3f3eecda27cae60df813fefcd84d3 (patch)
tree5e5b0f7a32b0727b64e52b9b2649897e6c841074 /drivers/bluetooth/dtl1_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/bluetooth/dtl1_cs.c')
-rw-r--r--drivers/bluetooth/dtl1_cs.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index 2874d8722be9..c39d4576cfff 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -96,8 +96,6 @@ static dev_info_t dev_info = "dtl1_cs";
96static dev_link_t *dtl1_attach(void); 96static dev_link_t *dtl1_attach(void);
97static void dtl1_detach(struct pcmcia_device *p_dev); 97static void dtl1_detach(struct pcmcia_device *p_dev);
98 98
99static dev_link_t *dev_list = NULL;
100
101 99
102/* Transmit states */ 100/* Transmit states */
103#define XMIT_SENDING 1 101#define XMIT_SENDING 1
@@ -589,8 +587,7 @@ static dev_link_t *dtl1_attach(void)
589 link->conf.IntType = INT_MEMORY_AND_IO; 587 link->conf.IntType = INT_MEMORY_AND_IO;
590 588
591 /* Register with Card Services */ 589 /* Register with Card Services */
592 link->next = dev_list; 590 link->next = NULL;
593 dev_list = link;
594 client_reg.dev_info = &dev_info; 591 client_reg.dev_info = &dev_info;
595 client_reg.Version = 0x0210; 592 client_reg.Version = 0x0210;
596 client_reg.event_callback_args.client_data = link; 593 client_reg.event_callback_args.client_data = link;
@@ -610,22 +607,10 @@ static void dtl1_detach(struct pcmcia_device *p_dev)
610{ 607{
611 dev_link_t *link = dev_to_instance(p_dev); 608 dev_link_t *link = dev_to_instance(p_dev);
612 dtl1_info_t *info = link->priv; 609 dtl1_info_t *info = link->priv;
613 dev_link_t **linkp;
614
615 /* Locate device structure */
616 for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
617 if (*linkp == link)
618 break;
619
620 if (*linkp == NULL)
621 return;
622 610
623 if (link->state & DEV_CONFIG) 611 if (link->state & DEV_CONFIG)
624 dtl1_release(link); 612 dtl1_release(link);
625 613
626 /* Unlink device structure, free bits */
627 *linkp = link->next;
628
629 kfree(info); 614 kfree(info);
630} 615}
631 616
@@ -822,7 +807,6 @@ static int __init init_dtl1_cs(void)
822static void __exit exit_dtl1_cs(void) 807static void __exit exit_dtl1_cs(void)
823{ 808{
824 pcmcia_unregister_driver(&dtl1_driver); 809 pcmcia_unregister_driver(&dtl1_driver);
825 BUG_ON(dev_list != NULL);
826} 810}
827 811
828module_init(init_dtl1_cs); 812module_init(init_dtl1_cs);