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/usb/host/sl811_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/usb/host/sl811_cs.c')
-rw-r--r-- | drivers/usb/host/sl811_cs.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index ed3e7014dbbc..439709670d0b 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
@@ -66,8 +66,6 @@ module_param(pc_debug, int, 0644); | |||
66 | 66 | ||
67 | static const char driver_name[DEV_NAME_LEN] = "sl811_cs"; | 67 | static const char driver_name[DEV_NAME_LEN] = "sl811_cs"; |
68 | 68 | ||
69 | static dev_link_t *dev_list = NULL; | ||
70 | |||
71 | typedef struct local_info_t { | 69 | typedef struct local_info_t { |
72 | dev_link_t link; | 70 | dev_link_t link; |
73 | dev_node_t node; | 71 | dev_node_t node; |
@@ -143,24 +141,13 @@ static int sl811_hc_init(struct device *parent, ioaddr_t base_addr, int irq) | |||
143 | static void sl811_cs_detach(struct pcmcia_device *p_dev) | 141 | static void sl811_cs_detach(struct pcmcia_device *p_dev) |
144 | { | 142 | { |
145 | dev_link_t *link = dev_to_instance(p_dev); | 143 | dev_link_t *link = dev_to_instance(p_dev); |
146 | dev_link_t **linkp; | ||
147 | 144 | ||
148 | DBG(0, "sl811_cs_detach(0x%p)\n", link); | 145 | DBG(0, "sl811_cs_detach(0x%p)\n", link); |
149 | 146 | ||
150 | /* Locate device structure */ | ||
151 | for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) { | ||
152 | if (*linkp == link) | ||
153 | break; | ||
154 | } | ||
155 | if (*linkp == NULL) | ||
156 | return; | ||
157 | |||
158 | link->state &= ~DEV_PRESENT; | 147 | link->state &= ~DEV_PRESENT; |
159 | if (link->state & DEV_CONFIG) | 148 | if (link->state & DEV_CONFIG) |
160 | sl811_cs_release(link); | 149 | sl811_cs_release(link); |
161 | 150 | ||
162 | /* Unlink device structure, and free it */ | ||
163 | *linkp = link->next; | ||
164 | /* This points to the parent local_info_t struct */ | 151 | /* This points to the parent local_info_t struct */ |
165 | kfree(link->priv); | 152 | kfree(link->priv); |
166 | } | 153 | } |
@@ -378,8 +365,7 @@ static dev_link_t *sl811_cs_attach(void) | |||
378 | link->conf.IntType = INT_MEMORY_AND_IO; | 365 | link->conf.IntType = INT_MEMORY_AND_IO; |
379 | 366 | ||
380 | /* Register with Card Services */ | 367 | /* Register with Card Services */ |
381 | link->next = dev_list; | 368 | link->next = NULL; |
382 | dev_list = link; | ||
383 | client_reg.dev_info = (dev_info_t *) &driver_name; | 369 | client_reg.dev_info = (dev_info_t *) &driver_name; |
384 | client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE; | 370 | client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE; |
385 | client_reg.Version = 0x0210; | 371 | client_reg.Version = 0x0210; |