aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/fmvj18x_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/pcmcia/fmvj18x_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/pcmcia/fmvj18x_cs.c')
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 560d4ee2280..dad6393052f 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -109,7 +109,6 @@ static void fjn_tx_timeout(struct net_device *dev);
109static struct ethtool_ops netdev_ethtool_ops; 109static struct ethtool_ops netdev_ethtool_ops;
110 110
111static dev_info_t dev_info = "fmvj18x_cs"; 111static dev_info_t dev_info = "fmvj18x_cs";
112static dev_link_t *dev_list;
113 112
114/* 113/*
115 card type 114 card type
@@ -283,8 +282,7 @@ static dev_link_t *fmvj18x_attach(void)
283 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); 282 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
284 283
285 /* Register with Card Services */ 284 /* Register with Card Services */
286 link->next = dev_list; 285 link->next = NULL;
287 dev_list = link;
288 client_reg.dev_info = &dev_info; 286 client_reg.dev_info = &dev_info;
289 client_reg.Version = 0x0210; 287 client_reg.Version = 0x0210;
290 client_reg.event_callback_args.client_data = link; 288 client_reg.event_callback_args.client_data = link;
@@ -304,15 +302,8 @@ static void fmvj18x_detach(struct pcmcia_device *p_dev)
304{ 302{
305 dev_link_t *link = dev_to_instance(p_dev); 303 dev_link_t *link = dev_to_instance(p_dev);
306 struct net_device *dev = link->priv; 304 struct net_device *dev = link->priv;
307 dev_link_t **linkp; 305
308
309 DEBUG(0, "fmvj18x_detach(0x%p)\n", link); 306 DEBUG(0, "fmvj18x_detach(0x%p)\n", link);
310
311 /* Locate device structure */
312 for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
313 if (*linkp == link) break;
314 if (*linkp == NULL)
315 return;
316 307
317 if (link->dev) 308 if (link->dev)
318 unregister_netdev(dev); 309 unregister_netdev(dev);
@@ -320,8 +311,6 @@ static void fmvj18x_detach(struct pcmcia_device *p_dev)
320 if (link->state & DEV_CONFIG) 311 if (link->state & DEV_CONFIG)
321 fmvj18x_release(link); 312 fmvj18x_release(link);
322 313
323 /* Unlink device structure, free pieces */
324 *linkp = link->next;
325 free_netdev(dev); 314 free_netdev(dev);
326} /* fmvj18x_detach */ 315} /* fmvj18x_detach */
327 316
@@ -807,7 +796,6 @@ static int __init init_fmvj18x_cs(void)
807static void __exit exit_fmvj18x_cs(void) 796static void __exit exit_fmvj18x_cs(void)
808{ 797{
809 pcmcia_unregister_driver(&fmvj18x_cs_driver); 798 pcmcia_unregister_driver(&fmvj18x_cs_driver);
810 BUG_ON(dev_list != NULL);
811} 799}
812 800
813module_init(init_fmvj18x_cs); 801module_init(init_fmvj18x_cs);