diff options
Diffstat (limited to 'drivers/ide/legacy/ide-cs.c')
-rw-r--r-- | drivers/ide/legacy/ide-cs.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index 56c8e828c6e6..4961f1e764a7 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c | |||
@@ -125,7 +125,6 @@ static int ide_probe(struct pcmcia_device *link) | |||
125 | link->conf.Attributes = CONF_ENABLE_IRQ; | 125 | link->conf.Attributes = CONF_ENABLE_IRQ; |
126 | link->conf.IntType = INT_MEMORY_AND_IO; | 126 | link->conf.IntType = INT_MEMORY_AND_IO; |
127 | 127 | ||
128 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | ||
129 | return ide_config(link); | 128 | return ide_config(link); |
130 | } /* ide_attach */ | 129 | } /* ide_attach */ |
131 | 130 | ||
@@ -142,8 +141,7 @@ static void ide_detach(struct pcmcia_device *link) | |||
142 | { | 141 | { |
143 | DEBUG(0, "ide_detach(0x%p)\n", link); | 142 | DEBUG(0, "ide_detach(0x%p)\n", link); |
144 | 143 | ||
145 | if (link->state & DEV_CONFIG) | 144 | ide_release(link); |
146 | ide_release(link); | ||
147 | 145 | ||
148 | kfree(link->priv); | 146 | kfree(link->priv); |
149 | } /* ide_detach */ | 147 | } /* ide_detach */ |
@@ -209,9 +207,6 @@ static int ide_config(struct pcmcia_device *link) | |||
209 | ((stk->parse.manfid.card == PRODID_KME_KXLC005_A) || | 207 | ((stk->parse.manfid.card == PRODID_KME_KXLC005_A) || |
210 | (stk->parse.manfid.card == PRODID_KME_KXLC005_B))); | 208 | (stk->parse.manfid.card == PRODID_KME_KXLC005_B))); |
211 | 209 | ||
212 | /* Configure card */ | ||
213 | link->state |= DEV_CONFIG; | ||
214 | |||
215 | /* Not sure if this is right... look up the current Vcc */ | 210 | /* Not sure if this is right... look up the current Vcc */ |
216 | CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &stk->conf)); | 211 | CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &stk->conf)); |
217 | 212 | ||
@@ -323,7 +318,6 @@ static int ide_config(struct pcmcia_device *link) | |||
323 | printk(KERN_INFO "ide-cs: %s: Vpp = %d.%d\n", | 318 | printk(KERN_INFO "ide-cs: %s: Vpp = %d.%d\n", |
324 | info->node.dev_name, link->conf.Vpp / 10, link->conf.Vpp % 10); | 319 | info->node.dev_name, link->conf.Vpp / 10, link->conf.Vpp % 10); |
325 | 320 | ||
326 | link->state &= ~DEV_CONFIG_PENDING; | ||
327 | kfree(stk); | 321 | kfree(stk); |
328 | return 0; | 322 | return 0; |
329 | 323 | ||
@@ -336,7 +330,6 @@ cs_failed: | |||
336 | failed: | 330 | failed: |
337 | kfree(stk); | 331 | kfree(stk); |
338 | ide_release(link); | 332 | ide_release(link); |
339 | link->state &= ~DEV_CONFIG_PENDING; | ||
340 | return -ENODEV; | 333 | return -ENODEV; |
341 | } /* ide_config */ | 334 | } /* ide_config */ |
342 | 335 | ||