summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-11-14 21:25:35 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-01-06 00:03:20 +0100
commitb463581154f3f3eecda27cae60df813fefcd84d3 (patch)
tree5e5b0f7a32b0727b64e52b9b2649897e6c841074 /drivers/bluetooth
parentf3990715589d378a2d3aa9b8accd78bb4a2378b7 (diff)
downloadlinux-b463581154f3f3eecda27cae60df813fefcd84d3.tar.bz2
[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')
-rw-r--r--drivers/bluetooth/bluecard_cs.c18
-rw-r--r--drivers/bluetooth/bt3c_cs.c18
-rw-r--r--drivers/bluetooth/btuart_cs.c18
-rw-r--r--drivers/bluetooth/dtl1_cs.c18
4 files changed, 4 insertions, 68 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";
static dev_link_t *bluecard_attach(void);
static void bluecard_detach(struct pcmcia_device *p_dev);
-static dev_link_t *dev_list = NULL;
-
/* Default baud rate: 57600, 115200, 230400 or 460800 */
#define DEFAULT_BAUD_RATE 230400
@@ -890,8 +888,7 @@ static dev_link_t *bluecard_attach(void)
link->conf.IntType = INT_MEMORY_AND_IO;
/* Register with Card Services */
- link->next = dev_list;
- dev_list = link;
+ link->next = NULL;
client_reg.dev_info = &dev_info;
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
@@ -911,22 +908,10 @@ static void bluecard_detach(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
bluecard_info_t *info = link->priv;
- dev_link_t **linkp;
-
- /* Locate device structure */
- for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
- if (*linkp == link)
- break;
-
- if (*linkp == NULL)
- return;
if (link->state & DEV_CONFIG)
bluecard_release(link);
- /* Unlink device structure, free bits */
- *linkp = link->next;
-
kfree(info);
}
@@ -1105,7 +1090,6 @@ static int __init init_bluecard_cs(void)
static void __exit exit_bluecard_cs(void)
{
pcmcia_unregister_driver(&bluecard_driver);
- BUG_ON(dev_list != NULL);
}
module_init(init_bluecard_cs);
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";
static dev_link_t *bt3c_attach(void);
static void bt3c_detach(struct pcmcia_device *p_dev);
-static dev_link_t *dev_list = NULL;
-
/* Transmit states */
#define XMIT_SENDING 1
@@ -691,8 +689,7 @@ static dev_link_t *bt3c_attach(void)
link->conf.IntType = INT_MEMORY_AND_IO;
/* Register with Card Services */
- link->next = dev_list;
- dev_list = link;
+ link->next = NULL;
client_reg.dev_info = &dev_info;
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
@@ -712,22 +709,10 @@ static void bt3c_detach(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
bt3c_info_t *info = link->priv;
- dev_link_t **linkp;
-
- /* Locate device structure */
- for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
- if (*linkp == link)
- break;
-
- if (*linkp == NULL)
- return;
if (link->state & DEV_CONFIG)
bt3c_release(link);
- /* Unlink device structure, free bits */
- *linkp = link->next;
-
kfree(info);
}
@@ -949,7 +934,6 @@ static int __init init_bt3c_cs(void)
static void __exit exit_bt3c_cs(void)
{
pcmcia_unregister_driver(&bt3c_driver);
- BUG_ON(dev_list != NULL);
}
module_init(init_bt3c_cs);
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";
static dev_link_t *btuart_attach(void);
static void btuart_detach(struct pcmcia_device *p_dev);
-static dev_link_t *dev_list = NULL;
-
/* Maximum baud rate */
#define SPEED_MAX 115200
@@ -610,8 +608,7 @@ static dev_link_t *btuart_attach(void)
link->conf.IntType = INT_MEMORY_AND_IO;
/* Register with Card Services */
- link->next = dev_list;
- dev_list = link;
+ link->next = NULL;
client_reg.dev_info = &dev_info;
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
@@ -631,22 +628,10 @@ static void btuart_detach(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
btuart_info_t *info = link->priv;
- dev_link_t **linkp;
-
- /* Locate device structure */
- for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
- if (*linkp == link)
- break;
-
- if (*linkp == NULL)
- return;
if (link->state & DEV_CONFIG)
btuart_release(link);
- /* Unlink device structure, free bits */
- *linkp = link->next;
-
kfree(info);
}
@@ -870,7 +855,6 @@ static int __init init_btuart_cs(void)
static void __exit exit_btuart_cs(void)
{
pcmcia_unregister_driver(&btuart_driver);
- BUG_ON(dev_list != NULL);
}
module_init(init_btuart_cs);
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";
static dev_link_t *dtl1_attach(void);
static void dtl1_detach(struct pcmcia_device *p_dev);
-static dev_link_t *dev_list = NULL;
-
/* Transmit states */
#define XMIT_SENDING 1
@@ -589,8 +587,7 @@ static dev_link_t *dtl1_attach(void)
link->conf.IntType = INT_MEMORY_AND_IO;
/* Register with Card Services */
- link->next = dev_list;
- dev_list = link;
+ link->next = NULL;
client_reg.dev_info = &dev_info;
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
@@ -610,22 +607,10 @@ static void dtl1_detach(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
dtl1_info_t *info = link->priv;
- dev_link_t **linkp;
-
- /* Locate device structure */
- for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
- if (*linkp == link)
- break;
-
- if (*linkp == NULL)
- return;
if (link->state & DEV_CONFIG)
dtl1_release(link);
- /* Unlink device structure, free bits */
- *linkp = link->next;
-
kfree(info);
}
@@ -822,7 +807,6 @@ static int __init init_dtl1_cs(void)
static void __exit exit_dtl1_cs(void)
{
pcmcia_unregister_driver(&dtl1_driver);
- BUG_ON(dev_list != NULL);
}
module_init(init_dtl1_cs);