diff options
Diffstat (limited to 'drivers/bluetooth/dtl1_cs.c')
-rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 18 |
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"; | |||
96 | static dev_link_t *dtl1_attach(void); | 96 | static dev_link_t *dtl1_attach(void); |
97 | static void dtl1_detach(struct pcmcia_device *p_dev); | 97 | static void dtl1_detach(struct pcmcia_device *p_dev); |
98 | 98 | ||
99 | static 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) | |||
822 | static void __exit exit_dtl1_cs(void) | 807 | static 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 | ||
828 | module_init(init_dtl1_cs); | 812 | module_init(init_dtl1_cs); |