From b463581154f3f3eecda27cae60df813fefcd84d3 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Mon, 14 Nov 2005 21:25:35 +0100 Subject: [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 --- drivers/scsi/pcmcia/qlogic_stub.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'drivers/scsi/pcmcia/qlogic_stub.c') diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index 8351dc234ff..e10281a6e5f 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); static void qlogic_detach(struct pcmcia_device *p_dev); -static dev_link_t *dev_list = NULL; - static dev_info_t dev_info = "qlogic_cs"; static struct Scsi_Host *qlogic_detect(struct scsi_host_template *host, @@ -190,8 +188,7 @@ static dev_link_t *qlogic_attach(void) link->conf.Present = PRESENT_OPTION; /* Register with Card Services */ - link->next = dev_list; - dev_list = link; + link->next = NULL; client_reg.dev_info = &dev_info; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -210,22 +207,12 @@ static dev_link_t *qlogic_attach(void) static void qlogic_detach(struct pcmcia_device *p_dev) { dev_link_t *link = dev_to_instance(p_dev); - dev_link_t **linkp; DEBUG(0, "qlogic_detach(0x%p)\n", link); - /* Locate device structure */ - for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) - if (*linkp == link) - break; - if (*linkp == NULL) - return; - if (link->state & DEV_CONFIG) qlogic_release(link); - /* Unlink device structure, free bits */ - *linkp = link->next; kfree(link->priv); } /* qlogic_detach */ @@ -439,7 +426,6 @@ static int __init init_qlogic_cs(void) static void __exit exit_qlogic_cs(void) { pcmcia_unregister_driver(&qlogic_cs_driver); - BUG_ON(dev_list != NULL); } MODULE_AUTHOR("Tom Zerucha, Michael Griffith"); -- cgit v1.2.3-70-g09d2