aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia/qlogic_stub.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/scsi/pcmcia/qlogic_stub.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/scsi/pcmcia/qlogic_stub.c')
-rw-r--r--drivers/scsi/pcmcia/qlogic_stub.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
index 8351dc234ffb..e10281a6e5f9 100644
--- a/drivers/scsi/pcmcia/qlogic_stub.c
+++ b/drivers/scsi/pcmcia/qlogic_stub.c
@@ -104,8 +104,6 @@ static dev_link_t *qlogic_attach(void);
104static void qlogic_detach(struct pcmcia_device *p_dev); 104static void qlogic_detach(struct pcmcia_device *p_dev);
105 105
106 106
107static dev_link_t *dev_list = NULL;
108
109static dev_info_t dev_info = "qlogic_cs"; 107static dev_info_t dev_info = "qlogic_cs";
110 108
111static struct Scsi_Host *qlogic_detect(struct scsi_host_template *host, 109static struct Scsi_Host *qlogic_detect(struct scsi_host_template *host,
@@ -190,8 +188,7 @@ static dev_link_t *qlogic_attach(void)
190 link->conf.Present = PRESENT_OPTION; 188 link->conf.Present = PRESENT_OPTION;
191 189
192 /* Register with Card Services */ 190 /* Register with Card Services */
193 link->next = dev_list; 191 link->next = NULL;
194 dev_list = link;
195 client_reg.dev_info = &dev_info; 192 client_reg.dev_info = &dev_info;
196 client_reg.Version = 0x0210; 193 client_reg.Version = 0x0210;
197 client_reg.event_callback_args.client_data = link; 194 client_reg.event_callback_args.client_data = link;
@@ -210,22 +207,12 @@ static dev_link_t *qlogic_attach(void)
210static void qlogic_detach(struct pcmcia_device *p_dev) 207static void qlogic_detach(struct pcmcia_device *p_dev)
211{ 208{
212 dev_link_t *link = dev_to_instance(p_dev); 209 dev_link_t *link = dev_to_instance(p_dev);
213 dev_link_t **linkp;
214 210
215 DEBUG(0, "qlogic_detach(0x%p)\n", link); 211 DEBUG(0, "qlogic_detach(0x%p)\n", link);
216 212
217 /* Locate device structure */
218 for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
219 if (*linkp == link)
220 break;
221 if (*linkp == NULL)
222 return;
223
224 if (link->state & DEV_CONFIG) 213 if (link->state & DEV_CONFIG)
225 qlogic_release(link); 214 qlogic_release(link);
226 215
227 /* Unlink device structure, free bits */
228 *linkp = link->next;
229 kfree(link->priv); 216 kfree(link->priv);
230 217
231} /* qlogic_detach */ 218} /* qlogic_detach */
@@ -439,7 +426,6 @@ static int __init init_qlogic_cs(void)
439static void __exit exit_qlogic_cs(void) 426static void __exit exit_qlogic_cs(void)
440{ 427{
441 pcmcia_unregister_driver(&qlogic_cs_driver); 428 pcmcia_unregister_driver(&qlogic_cs_driver);
442 BUG_ON(dev_list != NULL);
443} 429}
444 430
445MODULE_AUTHOR("Tom Zerucha, Michael Griffith"); 431MODULE_AUTHOR("Tom Zerucha, Michael Griffith");