diff options
Diffstat (limited to 'drivers/bluetooth/bt3c_cs.c')
-rw-r--r-- | drivers/bluetooth/bt3c_cs.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 02ce38e33d32..50aa52b3cd20 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -97,8 +97,6 @@ static dev_info_t dev_info = "bt3c_cs"; | |||
97 | static dev_link_t *bt3c_attach(void); | 97 | static dev_link_t *bt3c_attach(void); |
98 | static void bt3c_detach(struct pcmcia_device *p_dev); | 98 | static void bt3c_detach(struct pcmcia_device *p_dev); |
99 | 99 | ||
100 | static dev_link_t *dev_list = NULL; | ||
101 | |||
102 | 100 | ||
103 | /* Transmit states */ | 101 | /* Transmit states */ |
104 | #define XMIT_SENDING 1 | 102 | #define XMIT_SENDING 1 |
@@ -691,8 +689,7 @@ static dev_link_t *bt3c_attach(void) | |||
691 | link->conf.IntType = INT_MEMORY_AND_IO; | 689 | link->conf.IntType = INT_MEMORY_AND_IO; |
692 | 690 | ||
693 | /* Register with Card Services */ | 691 | /* Register with Card Services */ |
694 | link->next = dev_list; | 692 | link->next = NULL; |
695 | dev_list = link; | ||
696 | client_reg.dev_info = &dev_info; | 693 | client_reg.dev_info = &dev_info; |
697 | client_reg.Version = 0x0210; | 694 | client_reg.Version = 0x0210; |
698 | client_reg.event_callback_args.client_data = link; | 695 | client_reg.event_callback_args.client_data = link; |
@@ -712,22 +709,10 @@ static void bt3c_detach(struct pcmcia_device *p_dev) | |||
712 | { | 709 | { |
713 | dev_link_t *link = dev_to_instance(p_dev); | 710 | dev_link_t *link = dev_to_instance(p_dev); |
714 | bt3c_info_t *info = link->priv; | 711 | bt3c_info_t *info = link->priv; |
715 | dev_link_t **linkp; | ||
716 | |||
717 | /* Locate device structure */ | ||
718 | for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) | ||
719 | if (*linkp == link) | ||
720 | break; | ||
721 | |||
722 | if (*linkp == NULL) | ||
723 | return; | ||
724 | 712 | ||
725 | if (link->state & DEV_CONFIG) | 713 | if (link->state & DEV_CONFIG) |
726 | bt3c_release(link); | 714 | bt3c_release(link); |
727 | 715 | ||
728 | /* Unlink device structure, free bits */ | ||
729 | *linkp = link->next; | ||
730 | |||
731 | kfree(info); | 716 | kfree(info); |
732 | } | 717 | } |
733 | 718 | ||
@@ -949,7 +934,6 @@ static int __init init_bt3c_cs(void) | |||
949 | static void __exit exit_bt3c_cs(void) | 934 | static void __exit exit_bt3c_cs(void) |
950 | { | 935 | { |
951 | pcmcia_unregister_driver(&bt3c_driver); | 936 | pcmcia_unregister_driver(&bt3c_driver); |
952 | BUG_ON(dev_list != NULL); | ||
953 | } | 937 | } |
954 | 938 | ||
955 | module_init(init_bt3c_cs); | 939 | module_init(init_bt3c_cs); |