diff options
Diffstat (limited to 'drivers/bluetooth/btuart_cs.c')
-rw-r--r-- | drivers/bluetooth/btuart_cs.c | 18 |
1 files changed, 1 insertions, 17 deletions
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"; | |||
93 | static dev_link_t *btuart_attach(void); | 93 | static dev_link_t *btuart_attach(void); |
94 | static void btuart_detach(struct pcmcia_device *p_dev); | 94 | static void btuart_detach(struct pcmcia_device *p_dev); |
95 | 95 | ||
96 | static dev_link_t *dev_list = NULL; | ||
97 | |||
98 | 96 | ||
99 | /* Maximum baud rate */ | 97 | /* Maximum baud rate */ |
100 | #define SPEED_MAX 115200 | 98 | #define SPEED_MAX 115200 |
@@ -610,8 +608,7 @@ static dev_link_t *btuart_attach(void) | |||
610 | link->conf.IntType = INT_MEMORY_AND_IO; | 608 | link->conf.IntType = INT_MEMORY_AND_IO; |
611 | 609 | ||
612 | /* Register with Card Services */ | 610 | /* Register with Card Services */ |
613 | link->next = dev_list; | 611 | link->next = NULL; |
614 | dev_list = link; | ||
615 | client_reg.dev_info = &dev_info; | 612 | client_reg.dev_info = &dev_info; |
616 | client_reg.Version = 0x0210; | 613 | client_reg.Version = 0x0210; |
617 | client_reg.event_callback_args.client_data = link; | 614 | client_reg.event_callback_args.client_data = link; |
@@ -631,22 +628,10 @@ static void btuart_detach(struct pcmcia_device *p_dev) | |||
631 | { | 628 | { |
632 | dev_link_t *link = dev_to_instance(p_dev); | 629 | dev_link_t *link = dev_to_instance(p_dev); |
633 | btuart_info_t *info = link->priv; | 630 | btuart_info_t *info = link->priv; |
634 | dev_link_t **linkp; | ||
635 | |||
636 | /* Locate device structure */ | ||
637 | for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) | ||
638 | if (*linkp == link) | ||
639 | break; | ||
640 | |||
641 | if (*linkp == NULL) | ||
642 | return; | ||
643 | 631 | ||
644 | if (link->state & DEV_CONFIG) | 632 | if (link->state & DEV_CONFIG) |
645 | btuart_release(link); | 633 | btuart_release(link); |
646 | 634 | ||
647 | /* Unlink device structure, free bits */ | ||
648 | *linkp = link->next; | ||
649 | |||
650 | kfree(info); | 635 | kfree(info); |
651 | } | 636 | } |
652 | 637 | ||
@@ -870,7 +855,6 @@ static int __init init_btuart_cs(void) | |||
870 | static void __exit exit_btuart_cs(void) | 855 | static void __exit exit_btuart_cs(void) |
871 | { | 856 | { |
872 | pcmcia_unregister_driver(&btuart_driver); | 857 | pcmcia_unregister_driver(&btuart_driver); |
873 | BUG_ON(dev_list != NULL); | ||
874 | } | 858 | } |
875 | 859 | ||
876 | module_init(init_btuart_cs); | 860 | module_init(init_btuart_cs); |