aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo_cs.c
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/net/wireless/airo_cs.c
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/net/wireless/airo_cs.c')
-rw-r--r--drivers/net/wireless/airo_cs.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 7a28139544c0..88805a4c29f1 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -119,15 +119,7 @@ static dev_info_t dev_info = "airo_cs";
119 device numbers are used to derive the corresponding array index. 119 device numbers are used to derive the corresponding array index.
120*/ 120*/
121 121
122static dev_link_t *dev_list = NULL;
123
124/* 122/*
125 A dev_link_t structure has fields for most things that are needed
126 to keep track of a socket, but there will usually be some device
127 specific information that also needs to be kept track of. The
128 'priv' pointer in a dev_link_t structure can be used to point to
129 a device-specific private data structure, like this.
130
131 A driver needs to provide a dev_node_t structure for each device 123 A driver needs to provide a dev_node_t structure for each device
132 on a card. In some cases, there is only one device per card (for 124 on a card. In some cases, there is only one device per card (for
133 example, ethernet cards, modems). In other cases, there may be 125 example, ethernet cards, modems). In other cases, there may be
@@ -202,8 +194,7 @@ static dev_link_t *airo_attach(void)
202 link->priv = local; 194 link->priv = local;
203 195
204 /* Register with Card Services */ 196 /* Register with Card Services */
205 link->next = dev_list; 197 link->next = NULL;
206 dev_list = link;
207 client_reg.dev_info = &dev_info; 198 client_reg.dev_info = &dev_info;
208 client_reg.Version = 0x0210; 199 client_reg.Version = 0x0210;
209 client_reg.event_callback_args.client_data = link; 200 client_reg.event_callback_args.client_data = link;
@@ -229,29 +220,19 @@ static dev_link_t *airo_attach(void)
229static void airo_detach(struct pcmcia_device *p_dev) 220static void airo_detach(struct pcmcia_device *p_dev)
230{ 221{
231 dev_link_t *link = dev_to_instance(p_dev); 222 dev_link_t *link = dev_to_instance(p_dev);
232 dev_link_t **linkp; 223
233
234 DEBUG(0, "airo_detach(0x%p)\n", link); 224 DEBUG(0, "airo_detach(0x%p)\n", link);
235 225
236 /* Locate device structure */
237 for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
238 if (*linkp == link) break;
239 if (*linkp == NULL)
240 return;
241
242 if (link->state & DEV_CONFIG) 226 if (link->state & DEV_CONFIG)
243 airo_release(link); 227 airo_release(link);
244 228
245 if ( ((local_info_t*)link->priv)->eth_dev ) { 229 if ( ((local_info_t*)link->priv)->eth_dev ) {
246 stop_airo_card( ((local_info_t*)link->priv)->eth_dev, 0 ); 230 stop_airo_card( ((local_info_t*)link->priv)->eth_dev, 0 );
247 } 231 }
248 ((local_info_t*)link->priv)->eth_dev = NULL; 232 ((local_info_t*)link->priv)->eth_dev = NULL;
249 233
250 /* Unlink device structure, free pieces */
251 *linkp = link->next;
252 kfree(link->priv); 234 kfree(link->priv);
253 kfree(link); 235 kfree(link);
254
255} /* airo_detach */ 236} /* airo_detach */
256 237
257/*====================================================================== 238/*======================================================================
@@ -574,7 +555,6 @@ static int airo_cs_init(void)
574static void airo_cs_cleanup(void) 555static void airo_cs_cleanup(void)
575{ 556{
576 pcmcia_unregister_driver(&airo_driver); 557 pcmcia_unregister_driver(&airo_driver);
577 BUG_ON(dev_list != NULL);
578} 558}
579 559
580/* 560/*