summaryrefslogtreecommitdiff
path: root/drivers/isdn/hisax/elsa_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:26:06 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:26:06 +0200
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);
handler.
*/
-static void elsa_cs_config(struct pcmcia_device *link);
+static int elsa_cs_config(struct pcmcia_device *link);
static void elsa_cs_release(struct pcmcia_device *link);
/*
@@ -139,7 +139,7 @@ typedef struct local_info_t {
======================================================================*/
-static int elsa_cs_attach(struct pcmcia_device *link)
+static int elsa_cs_probe(struct pcmcia_device *link)
{
local_info_t *local;
@@ -175,9 +175,7 @@ static int elsa_cs_attach(struct pcmcia_device *link)
link->conf.IntType = INT_MEMORY_AND_IO;
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- elsa_cs_config(link);
-
- return 0;
+ return elsa_cs_config(link);
} /* elsa_cs_attach */
/*======================================================================
@@ -235,7 +233,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple,
return get_tuple(handle, tuple, parse);
}
-static void elsa_cs_config(struct pcmcia_device *link)
+static int elsa_cs_config(struct pcmcia_device *link)
{
tuple_t tuple;
cisparse_t parse;
@@ -346,10 +344,11 @@ static void elsa_cs_config(struct pcmcia_device *link)
} else
((local_info_t*)link->priv)->cardnr = i;
- return;
+ return 0;
cs_failed:
cs_error(link, last_fn, i);
elsa_cs_release(link);
+ return -ENODEV;
} /* elsa_cs_config */
/*======================================================================
@@ -406,7 +405,7 @@ static struct pcmcia_driver elsa_cs_driver = {
.drv = {
.name = "elsa_cs",
},
- .probe = elsa_cs_attach,
+ .probe = elsa_cs_probe,
.remove = elsa_cs_detach,
.id_table = elsa_ids,
.suspend = elsa_suspend,