aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index 28f9211726c5..7bbfd85ab793 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -127,7 +127,6 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
127 memset(local, 0, sizeof(local_info_t)); 127 memset(local, 0, sizeof(local_info_t));
128 p_dev->priv = local; 128 p_dev->priv = local;
129 129
130 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
131 return avmcs_config(p_dev); 130 return avmcs_config(p_dev);
132 131
133 err: 132 err:
@@ -145,10 +144,8 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
145 144
146static void avmcs_detach(struct pcmcia_device *link) 145static void avmcs_detach(struct pcmcia_device *link)
147{ 146{
148 if (link->state & DEV_CONFIG)
149 avmcs_release(link); 147 avmcs_release(link);
150 148 kfree(link->priv);
151 kfree(link->priv);
152} /* avmcs_detach */ 149} /* avmcs_detach */
153 150
154/*====================================================================== 151/*======================================================================
@@ -216,12 +213,8 @@ static int avmcs_config(struct pcmcia_device *link)
216 } while (0); 213 } while (0);
217 if (i != CS_SUCCESS) { 214 if (i != CS_SUCCESS) {
218 cs_error(link, ParseTuple, i); 215 cs_error(link, ParseTuple, i);
219 link->state &= ~DEV_CONFIG_PENDING;
220 return -ENODEV; 216 return -ENODEV;
221 } 217 }
222
223 /* Configure card */
224 link->state |= DEV_CONFIG;
225 218
226 do { 219 do {
227 220
@@ -312,8 +305,7 @@ found_port:
312 dev->node.major = 64; 305 dev->node.major = 64;
313 dev->node.minor = 0; 306 dev->node.minor = 0;
314 link->dev_node = &dev->node; 307 link->dev_node = &dev->node;
315 308
316 link->state &= ~DEV_CONFIG_PENDING;
317 /* If any step failed, release any partially configured state */ 309 /* If any step failed, release any partially configured state */
318 if (i != 0) { 310 if (i != 0) {
319 avmcs_release(link); 311 avmcs_release(link);