diff options
Diffstat (limited to 'drivers/bluetooth/bluecard_cs.c')
-rw-r--r-- | drivers/bluetooth/bluecard_cs.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index f5088cb3812b..bd80535646fa 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -94,8 +94,6 @@ static dev_info_t dev_info = "bluecard_cs"; | |||
94 | static dev_link_t *bluecard_attach(void); | 94 | static dev_link_t *bluecard_attach(void); |
95 | static void bluecard_detach(struct pcmcia_device *p_dev); | 95 | static void bluecard_detach(struct pcmcia_device *p_dev); |
96 | 96 | ||
97 | static dev_link_t *dev_list = NULL; | ||
98 | |||
99 | 97 | ||
100 | /* Default baud rate: 57600, 115200, 230400 or 460800 */ | 98 | /* Default baud rate: 57600, 115200, 230400 or 460800 */ |
101 | #define DEFAULT_BAUD_RATE 230400 | 99 | #define DEFAULT_BAUD_RATE 230400 |
@@ -890,8 +888,7 @@ static dev_link_t *bluecard_attach(void) | |||
890 | link->conf.IntType = INT_MEMORY_AND_IO; | 888 | link->conf.IntType = INT_MEMORY_AND_IO; |
891 | 889 | ||
892 | /* Register with Card Services */ | 890 | /* Register with Card Services */ |
893 | link->next = dev_list; | 891 | link->next = NULL; |
894 | dev_list = link; | ||
895 | client_reg.dev_info = &dev_info; | 892 | client_reg.dev_info = &dev_info; |
896 | client_reg.Version = 0x0210; | 893 | client_reg.Version = 0x0210; |
897 | client_reg.event_callback_args.client_data = link; | 894 | client_reg.event_callback_args.client_data = link; |
@@ -911,22 +908,10 @@ static void bluecard_detach(struct pcmcia_device *p_dev) | |||
911 | { | 908 | { |
912 | dev_link_t *link = dev_to_instance(p_dev); | 909 | dev_link_t *link = dev_to_instance(p_dev); |
913 | bluecard_info_t *info = link->priv; | 910 | bluecard_info_t *info = link->priv; |
914 | dev_link_t **linkp; | ||
915 | |||
916 | /* Locate device structure */ | ||
917 | for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) | ||
918 | if (*linkp == link) | ||
919 | break; | ||
920 | |||
921 | if (*linkp == NULL) | ||
922 | return; | ||
923 | 911 | ||
924 | if (link->state & DEV_CONFIG) | 912 | if (link->state & DEV_CONFIG) |
925 | bluecard_release(link); | 913 | bluecard_release(link); |
926 | 914 | ||
927 | /* Unlink device structure, free bits */ | ||
928 | *linkp = link->next; | ||
929 | |||
930 | kfree(info); | 915 | kfree(info); |
931 | } | 916 | } |
932 | 917 | ||
@@ -1105,7 +1090,6 @@ static int __init init_bluecard_cs(void) | |||
1105 | static void __exit exit_bluecard_cs(void) | 1090 | static void __exit exit_bluecard_cs(void) |
1106 | { | 1091 | { |
1107 | pcmcia_unregister_driver(&bluecard_driver); | 1092 | pcmcia_unregister_driver(&bluecard_driver); |
1108 | BUG_ON(dev_list != NULL); | ||
1109 | } | 1093 | } |
1110 | 1094 | ||
1111 | module_init(init_bluecard_cs); | 1095 | module_init(init_bluecard_cs); |