aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parport/parport_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parport/parport_cs.c')
-rw-r--r--drivers/parport/parport_cs.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index e4be826c48ba..b953d5907c05 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -119,7 +119,6 @@ static int parport_probe(struct pcmcia_device *link)
119 link->conf.Attributes = CONF_ENABLE_IRQ; 119 link->conf.Attributes = CONF_ENABLE_IRQ;
120 link->conf.IntType = INT_MEMORY_AND_IO; 120 link->conf.IntType = INT_MEMORY_AND_IO;
121 121
122 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
123 return parport_config(link); 122 return parport_config(link);
124} /* parport_attach */ 123} /* parport_attach */
125 124
@@ -136,8 +135,7 @@ static void parport_detach(struct pcmcia_device *link)
136{ 135{
137 DEBUG(0, "parport_detach(0x%p)\n", link); 136 DEBUG(0, "parport_detach(0x%p)\n", link);
138 137
139 if (link->state & DEV_CONFIG) 138 parport_cs_release(link);
140 parport_cs_release(link);
141 139
142 kfree(link->priv); 140 kfree(link->priv);
143} /* parport_detach */ 141} /* parport_detach */
@@ -175,9 +173,6 @@ static int parport_config(struct pcmcia_device *link)
175 CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); 173 CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
176 link->conf.ConfigBase = parse.config.base; 174 link->conf.ConfigBase = parse.config.base;
177 link->conf.Present = parse.config.rmask[0]; 175 link->conf.Present = parse.config.rmask[0];
178
179 /* Configure card */
180 link->state |= DEV_CONFIG;
181 176
182 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; 177 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
183 tuple.Attributes = 0; 178 tuple.Attributes = 0;
@@ -233,14 +228,12 @@ static int parport_config(struct pcmcia_device *link)
233 strcpy(info->node.dev_name, p->name); 228 strcpy(info->node.dev_name, p->name);
234 link->dev_node = &info->node; 229 link->dev_node = &info->node;
235 230
236 link->state &= ~DEV_CONFIG_PENDING;
237 return 0; 231 return 0;
238 232
239cs_failed: 233cs_failed:
240 cs_error(link, last_fn, last_ret); 234 cs_error(link, last_fn, last_ret);
241failed: 235failed:
242 parport_cs_release(link); 236 parport_cs_release(link);
243 link->state &= ~DEV_CONFIG_PENDING;
244 return -ENODEV; 237 return -ENODEV;
245} /* parport_config */ 238} /* parport_config */
246 239