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/isdn/hardware/avm | |
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/isdn/hardware/avm')
-rw-r--r-- | drivers/isdn/hardware/avm/avm_cs.c | 21 |
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 | ||
86 | static 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) | |||
188 | static void avmcs_detach(struct pcmcia_device *p_dev) | 179 | static 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) | |||
494 | static void __exit avmcs_exit(void) | 476 | static 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 | ||
500 | module_init(avmcs_init); | 481 | module_init(avmcs_init); |