aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-11-14 15:25:35 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-01-05 18:03:20 -0500
commitb463581154f3f3eecda27cae60df813fefcd84d3 (patch)
tree5e5b0f7a32b0727b64e52b9b2649897e6c841074 /drivers/isdn/hardware
parentf3990715589d378a2d3aa9b8accd78bb4a2378b7 (diff)
[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/isdn/hardware')
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index 2d898d3afc97..0a8c1da10b4b 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -83,15 +83,7 @@ static dev_info_t dev_info = "avm_cs";
83 device numbers are used to derive the corresponding array index. 83 device numbers are used to derive the corresponding array index.
84*/ 84*/
85 85
86static dev_link_t *dev_list = NULL;
87
88/* 86/*
89 A dev_link_t structure has fields for most things that are needed
90 to keep track of a socket, but there will usually be some device
91 specific information that also needs to be kept track of. The
92 'priv' pointer in a dev_link_t structure can be used to point to
93 a device-specific private data structure, like this.
94
95 A driver needs to provide a dev_node_t structure for each device 87 A driver needs to provide a dev_node_t structure for each device
96 on a card. In some cases, there is only one device per card (for 88 on a card. In some cases, there is only one device per card (for
97 example, ethernet cards, modems). In other cases, there may be 89 example, ethernet cards, modems). In other cases, there may be
@@ -157,8 +149,7 @@ static dev_link_t *avmcs_attach(void)
157 link->priv = local; 149 link->priv = local;
158 150
159 /* Register with Card Services */ 151 /* Register with Card Services */
160 link->next = dev_list; 152 link->next = NULL;
161 dev_list = link;
162 client_reg.dev_info = &dev_info; 153 client_reg.dev_info = &dev_info;
163 client_reg.Version = 0x0210; 154 client_reg.Version = 0x0210;
164 client_reg.event_callback_args.client_data = link; 155 client_reg.event_callback_args.client_data = link;
@@ -188,19 +179,10 @@ static dev_link_t *avmcs_attach(void)
188static void avmcs_detach(struct pcmcia_device *p_dev) 179static void avmcs_detach(struct pcmcia_device *p_dev)
189{ 180{
190 dev_link_t *link = dev_to_instance(p_dev); 181 dev_link_t *link = dev_to_instance(p_dev);
191 dev_link_t **linkp;
192
193 /* Locate device structure */
194 for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
195 if (*linkp == link) break;
196 if (*linkp == NULL)
197 return;
198 182
199 if (link->state & DEV_CONFIG) 183 if (link->state & DEV_CONFIG)
200 avmcs_release(link); 184 avmcs_release(link);
201 185
202 /* Unlink device structure, free pieces */
203 *linkp = link->next;
204 kfree(link->priv); 186 kfree(link->priv);
205 kfree(link); 187 kfree(link);
206} /* avmcs_detach */ 188} /* avmcs_detach */
@@ -494,7 +476,6 @@ static int __init avmcs_init(void)
494static void __exit avmcs_exit(void) 476static void __exit avmcs_exit(void)
495{ 477{
496 pcmcia_unregister_driver(&avmcs_driver); 478 pcmcia_unregister_driver(&avmcs_driver);
497 BUG_ON(dev_list != NULL);
498} 479}
499 480
500module_init(avmcs_init); 481module_init(avmcs_init);