aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/elsa_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:26:06 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:26:06 -0500
commit15b99ac1729503db9e6dc642a50b9b6cb3bf51f9 (patch)
treecfb8897487beba502aac2b28bc35066a87e34299 /drivers/isdn/hisax/elsa_cs.c
parentfba395eee7d3f342ca739c20f5b3ee635d0420a0 (diff)
[PATCH] pcmcia: add return value to _config() functions
Most of the driver initialization isn't done in the .probe function, but in the internal _config() functions. Make them return a value, so that .probe can properly report whether the probing of the device succeeded or not. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/isdn/hisax/elsa_cs.c')
-rw-r--r--drivers/isdn/hisax/elsa_cs.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index 7a42bd43162f..4856680ce761 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -94,7 +94,7 @@ module_param(protocol, int, 0);
94 handler. 94 handler.
95*/ 95*/
96 96
97static void elsa_cs_config(struct pcmcia_device *link); 97static int elsa_cs_config(struct pcmcia_device *link);
98static void elsa_cs_release(struct pcmcia_device *link); 98static void elsa_cs_release(struct pcmcia_device *link);
99 99
100/* 100/*
@@ -139,7 +139,7 @@ typedef struct local_info_t {
139 139
140======================================================================*/ 140======================================================================*/
141 141
142static int elsa_cs_attach(struct pcmcia_device *link) 142static int elsa_cs_probe(struct pcmcia_device *link)
143{ 143{
144 local_info_t *local; 144 local_info_t *local;
145 145
@@ -175,9 +175,7 @@ static int elsa_cs_attach(struct pcmcia_device *link)
175 link->conf.IntType = INT_MEMORY_AND_IO; 175 link->conf.IntType = INT_MEMORY_AND_IO;
176 176
177 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 177 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
178 elsa_cs_config(link); 178 return elsa_cs_config(link);
179
180 return 0;
181} /* elsa_cs_attach */ 179} /* elsa_cs_attach */
182 180
183/*====================================================================== 181/*======================================================================
@@ -235,7 +233,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple,
235 return get_tuple(handle, tuple, parse); 233 return get_tuple(handle, tuple, parse);
236} 234}
237 235
238static void elsa_cs_config(struct pcmcia_device *link) 236static int elsa_cs_config(struct pcmcia_device *link)
239{ 237{
240 tuple_t tuple; 238 tuple_t tuple;
241 cisparse_t parse; 239 cisparse_t parse;
@@ -346,10 +344,11 @@ static void elsa_cs_config(struct pcmcia_device *link)
346 } else 344 } else
347 ((local_info_t*)link->priv)->cardnr = i; 345 ((local_info_t*)link->priv)->cardnr = i;
348 346
349 return; 347 return 0;
350cs_failed: 348cs_failed:
351 cs_error(link, last_fn, i); 349 cs_error(link, last_fn, i);
352 elsa_cs_release(link); 350 elsa_cs_release(link);
351 return -ENODEV;
353} /* elsa_cs_config */ 352} /* elsa_cs_config */
354 353
355/*====================================================================== 354/*======================================================================
@@ -406,7 +405,7 @@ static struct pcmcia_driver elsa_cs_driver = {
406 .drv = { 405 .drv = {
407 .name = "elsa_cs", 406 .name = "elsa_cs",
408 }, 407 },
409 .probe = elsa_cs_attach, 408 .probe = elsa_cs_probe,
410 .remove = elsa_cs_detach, 409 .remove = elsa_cs_detach,
411 .id_table = elsa_ids, 410 .id_table = elsa_ids,
412 .suspend = elsa_suspend, 411 .suspend = elsa_suspend,