summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/airo_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/net/wireless/airo_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/net/wireless/airo_cs.c')
-rw-r--r--drivers/net/wireless/airo_cs.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 76970197f98f..97f41565fca8 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -80,7 +80,7 @@ MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards");
event handler.
*/
-static void airo_config(struct pcmcia_device *link);
+static int airo_config(struct pcmcia_device *link);
static void airo_release(struct pcmcia_device *link);
/*
@@ -141,7 +141,7 @@ typedef struct local_info_t {
======================================================================*/
-static int airo_attach(struct pcmcia_device *p_dev)
+static int airo_probe(struct pcmcia_device *p_dev)
{
local_info_t *local;
@@ -171,9 +171,7 @@ static int airo_attach(struct pcmcia_device *p_dev)
p_dev->priv = local;
p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- airo_config(p_dev);
-
- return 0;
+ return airo_config(p_dev);
} /* airo_attach */
/*======================================================================
@@ -211,7 +209,7 @@ static void airo_detach(struct pcmcia_device *link)
#define CS_CHECK(fn, ret) \
do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-static void airo_config(struct pcmcia_device *link)
+static int airo_config(struct pcmcia_device *link)
{
tuple_t tuple;
cisparse_t parse;
@@ -386,12 +384,12 @@ static void airo_config(struct pcmcia_device *link)
printk("\n");
link->state &= ~DEV_CONFIG_PENDING;
- return;
-
+ return 0;
+
cs_failed:
cs_error(link, last_fn, last_ret);
airo_release(link);
-
+ return -ENODEV;
} /* airo_config */
/*======================================================================
@@ -444,7 +442,7 @@ static struct pcmcia_driver airo_driver = {
.drv = {
.name = "airo_cs",
},
- .probe = airo_attach,
+ .probe = airo_probe,
.remove = airo_detach,
.id_table = airo_ids,
.suspend = airo_suspend,