aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn/hisax/avma1_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/avma1_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/avma1_cs.c')
-rw-r--r--drivers/isdn/hisax/avma1_cs.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index ff6b0e185bc..11c7c4f09e7 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -67,7 +67,7 @@ module_param(isdnprot, int, 0);
handler.
*/
-static void avma1cs_config(struct pcmcia_device *link);
+static int avma1cs_config(struct pcmcia_device *link);
static void avma1cs_release(struct pcmcia_device *link);
/*
@@ -116,7 +116,7 @@ typedef struct local_info_t {
======================================================================*/
-static int avma1cs_attach(struct pcmcia_device *p_dev)
+static int avma1cs_probe(struct pcmcia_device *p_dev)
{
local_info_t *local;
@@ -150,9 +150,7 @@ static int avma1cs_attach(struct pcmcia_device *p_dev)
p_dev->conf.Present = PRESENT_OPTION;
p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- avma1cs_config(p_dev);
-
- return 0;
+ return avma1cs_config(p_dev);
} /* avma1cs_attach */
/*======================================================================
@@ -206,7 +204,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple,
return get_tuple(handle, tuple, parse);
}
-static void avma1cs_config(struct pcmcia_device *link)
+static int avma1cs_config(struct pcmcia_device *link)
{
tuple_t tuple;
cisparse_t parse;
@@ -242,7 +240,7 @@ static void avma1cs_config(struct pcmcia_device *link)
if (i != CS_SUCCESS) {
cs_error(link, ParseTuple, i);
link->state &= ~DEV_CONFIG_PENDING;
- return;
+ return -ENODEV;
}
/* Configure card */
@@ -325,7 +323,7 @@ found_port:
/* If any step failed, release any partially configured state */
if (i != 0) {
avma1cs_release(link);
- return;
+ return -ENODEV;
}
printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n",
@@ -340,10 +338,11 @@ found_port:
if (i < 0) {
printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 PCMCIA %d at i/o %#x\n", i, link->io.BasePort1);
avma1cs_release(link);
- return;
+ return -ENODEV;
}
dev->node.minor = i;
+ return 0;
} /* avma1cs_config */
/*======================================================================
@@ -379,7 +378,7 @@ static struct pcmcia_driver avma1cs_driver = {
.drv = {
.name = "avma1_cs",
},
- .probe = avma1cs_attach,
+ .probe = avma1cs_probe,
.remove = avma1cs_detach,
.id_table = avma1cs_ids,
};