aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/sl811_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/sl811_cs.c')
-rw-r--r--drivers/usb/host/sl811_cs.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index e8b8e9a93084..302aa1ec312f 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -142,9 +142,7 @@ static void sl811_cs_detach(struct pcmcia_device *link)
142{ 142{
143 DBG(0, "sl811_cs_detach(0x%p)\n", link); 143 DBG(0, "sl811_cs_detach(0x%p)\n", link);
144 144
145 link->state &= ~DEV_PRESENT; 145 sl811_cs_release(link);
146 if (link->state & DEV_CONFIG)
147 sl811_cs_release(link);
148 146
149 /* This points to the parent local_info_t struct */ 147 /* This points to the parent local_info_t struct */
150 kfree(link->priv); 148 kfree(link->priv);
@@ -182,9 +180,6 @@ static int sl811_cs_config(struct pcmcia_device *link)
182 link->conf.ConfigBase = parse.config.base; 180 link->conf.ConfigBase = parse.config.base;
183 link->conf.Present = parse.config.rmask[0]; 181 link->conf.Present = parse.config.rmask[0];
184 182
185 /* Configure card */
186 link->state |= DEV_CONFIG;
187
188 /* Look up the current Vcc */ 183 /* Look up the current Vcc */
189 CS_CHECK(GetConfigurationInfo, 184 CS_CHECK(GetConfigurationInfo,
190 pcmcia_get_configuration_info(link, &conf)); 185 pcmcia_get_configuration_info(link, &conf));
@@ -276,15 +271,12 @@ next_entry:
276 link->io.BasePort1+link->io.NumPorts1-1); 271 link->io.BasePort1+link->io.NumPorts1-1);
277 printk("\n"); 272 printk("\n");
278 273
279 link->state &= ~DEV_CONFIG_PENDING;
280
281 if (sl811_hc_init(parent, link->io.BasePort1, link->irq.AssignedIRQ) 274 if (sl811_hc_init(parent, link->io.BasePort1, link->irq.AssignedIRQ)
282 < 0) { 275 < 0) {
283cs_failed: 276cs_failed:
284 printk("sl811_cs_config failed\n"); 277 printk("sl811_cs_config failed\n");
285 cs_error(link, last_fn, last_ret); 278 cs_error(link, last_fn, last_ret);
286 sl811_cs_release(link); 279 sl811_cs_release(link);
287 link->state &= ~DEV_CONFIG_PENDING;
288 return -ENODEV; 280 return -ENODEV;
289 } 281 }
290 return 0; 282 return 0;
@@ -309,7 +301,6 @@ static int sl811_cs_probe(struct pcmcia_device *link)
309 link->conf.Attributes = 0; 301 link->conf.Attributes = 0;
310 link->conf.IntType = INT_MEMORY_AND_IO; 302 link->conf.IntType = INT_MEMORY_AND_IO;
311 303
312 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
313 return sl811_cs_config(link); 304 return sl811_cs_config(link);
314} 305}
315 306