diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-11-14 15:25:35 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-05 18:03:20 -0500 |
commit | b463581154f3f3eecda27cae60df813fefcd84d3 (patch) | |
tree | 5e5b0f7a32b0727b64e52b9b2649897e6c841074 /drivers/net/pcmcia/axnet_cs.c | |
parent | f3990715589d378a2d3aa9b8accd78bb4a2378b7 (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/axnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 11f701a8ff02..3d36207d3332 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -111,7 +111,6 @@ static dev_link_t *axnet_attach(void); | |||
111 | static void axnet_detach(struct pcmcia_device *p_dev); | 111 | static void axnet_detach(struct pcmcia_device *p_dev); |
112 | 112 | ||
113 | static dev_info_t dev_info = "axnet_cs"; | 113 | static dev_info_t dev_info = "axnet_cs"; |
114 | static dev_link_t *dev_list; | ||
115 | 114 | ||
116 | static void axdev_setup(struct net_device *dev); | 115 | static void axdev_setup(struct net_device *dev); |
117 | static void AX88190_init(struct net_device *dev, int startp); | 116 | static void AX88190_init(struct net_device *dev, int startp); |
@@ -177,8 +176,7 @@ static dev_link_t *axnet_attach(void) | |||
177 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | 176 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); |
178 | 177 | ||
179 | /* Register with Card Services */ | 178 | /* Register with Card Services */ |
180 | link->next = dev_list; | 179 | link->next = NULL; |
181 | dev_list = link; | ||
182 | client_reg.dev_info = &dev_info; | 180 | client_reg.dev_info = &dev_info; |
183 | client_reg.Version = 0x0210; | 181 | client_reg.Version = 0x0210; |
184 | client_reg.event_callback_args.client_data = link; | 182 | client_reg.event_callback_args.client_data = link; |
@@ -205,24 +203,15 @@ static void axnet_detach(struct pcmcia_device *p_dev) | |||
205 | { | 203 | { |
206 | dev_link_t *link = dev_to_instance(p_dev); | 204 | dev_link_t *link = dev_to_instance(p_dev); |
207 | struct net_device *dev = link->priv; | 205 | struct net_device *dev = link->priv; |
208 | dev_link_t **linkp; | ||
209 | 206 | ||
210 | DEBUG(0, "axnet_detach(0x%p)\n", link); | 207 | DEBUG(0, "axnet_detach(0x%p)\n", link); |
211 | 208 | ||
212 | /* Locate device structure */ | ||
213 | for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) | ||
214 | if (*linkp == link) break; | ||
215 | if (*linkp == NULL) | ||
216 | return; | ||
217 | |||
218 | if (link->dev) | 209 | if (link->dev) |
219 | unregister_netdev(dev); | 210 | unregister_netdev(dev); |
220 | 211 | ||
221 | if (link->state & DEV_CONFIG) | 212 | if (link->state & DEV_CONFIG) |
222 | axnet_release(link); | 213 | axnet_release(link); |
223 | 214 | ||
224 | /* Unlink device structure, free bits */ | ||
225 | *linkp = link->next; | ||
226 | free_netdev(dev); | 215 | free_netdev(dev); |
227 | } /* axnet_detach */ | 216 | } /* axnet_detach */ |
228 | 217 | ||
@@ -896,7 +885,6 @@ static int __init init_axnet_cs(void) | |||
896 | static void __exit exit_axnet_cs(void) | 885 | static void __exit exit_axnet_cs(void) |
897 | { | 886 | { |
898 | pcmcia_unregister_driver(&axnet_cs_driver); | 887 | pcmcia_unregister_driver(&axnet_cs_driver); |
899 | BUG_ON(dev_list != NULL); | ||
900 | } | 888 | } |
901 | 889 | ||
902 | module_init(init_axnet_cs); | 890 | module_init(init_axnet_cs); |