aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/avma1_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hisax/avma1_cs.c')
-rw-r--r--drivers/isdn/hisax/avma1_cs.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 11c7c4f09e7e..ac28e3278ad9 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -149,7 +149,6 @@ static int avma1cs_probe(struct pcmcia_device *p_dev)
149 p_dev->conf.ConfigIndex = 1; 149 p_dev->conf.ConfigIndex = 1;
150 p_dev->conf.Present = PRESENT_OPTION; 150 p_dev->conf.Present = PRESENT_OPTION;
151 151
152 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
153 return avma1cs_config(p_dev); 152 return avma1cs_config(p_dev);
154} /* avma1cs_attach */ 153} /* avma1cs_attach */
155 154
@@ -164,12 +163,9 @@ static int avma1cs_probe(struct pcmcia_device *p_dev)
164 163
165static void avma1cs_detach(struct pcmcia_device *link) 164static void avma1cs_detach(struct pcmcia_device *link)
166{ 165{
167 DEBUG(0, "avma1cs_detach(0x%p)\n", link); 166 DEBUG(0, "avma1cs_detach(0x%p)\n", link);
168 167 avma1cs_release(link);
169 if (link->state & DEV_CONFIG) 168 kfree(link->priv);
170 avma1cs_release(link);
171
172 kfree(link->priv);
173} /* avma1cs_detach */ 169} /* avma1cs_detach */
174 170
175/*====================================================================== 171/*======================================================================
@@ -239,12 +235,8 @@ static int avma1cs_config(struct pcmcia_device *link)
239 } while (0); 235 } while (0);
240 if (i != CS_SUCCESS) { 236 if (i != CS_SUCCESS) {
241 cs_error(link, ParseTuple, i); 237 cs_error(link, ParseTuple, i);
242 link->state &= ~DEV_CONFIG_PENDING;
243 return -ENODEV; 238 return -ENODEV;
244 } 239 }
245
246 /* Configure card */
247 link->state |= DEV_CONFIG;
248 240
249 do { 241 do {
250 242
@@ -318,8 +310,7 @@ found_port:
318 dev->node.major = 45; 310 dev->node.major = 45;
319 dev->node.minor = 0; 311 dev->node.minor = 0;
320 link->dev_node = &dev->node; 312 link->dev_node = &dev->node;
321 313
322 link->state &= ~DEV_CONFIG_PENDING;
323 /* If any step failed, release any partially configured state */ 314 /* If any step failed, release any partially configured state */
324 if (i != 0) { 315 if (i != 0) {
325 avma1cs_release(link); 316 avma1cs_release(link);