aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/atmel_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/atmel_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/atmel_cs.c')
-rw-r--r--drivers/net/wireless/atmel_cs.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 843dd1a036d..962272c1342 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -91,7 +91,7 @@ MODULE_SUPPORTED_DEVICE("Atmel at76c50x PCMCIA cards");
event handler.
*/
-static void atmel_config(struct pcmcia_device *link);
+static int atmel_config(struct pcmcia_device *link);
static void atmel_release(struct pcmcia_device *link);
/*
@@ -152,7 +152,7 @@ typedef struct local_info_t {
======================================================================*/
-static int atmel_attach(struct pcmcia_device *p_dev)
+static int atmel_probe(struct pcmcia_device *p_dev)
{
local_info_t *local;
@@ -182,9 +182,7 @@ static int atmel_attach(struct pcmcia_device *p_dev)
p_dev->priv = local;
p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- atmel_config(p_dev);
-
- return 0;
+ return atmel_config(p_dev);
} /* atmel_attach */
/*======================================================================
@@ -230,7 +228,7 @@ static int card_present(void *arg)
return 0;
}
-static void atmel_config(struct pcmcia_device *link)
+static int atmel_config(struct pcmcia_device *link)
{
tuple_t tuple;
cisparse_t parse;
@@ -377,11 +375,12 @@ static void atmel_config(struct pcmcia_device *link)
link->dev_node = &dev->node;
link->state &= ~DEV_CONFIG_PENDING;
- return;
+ return 0;
cs_failed:
cs_error(link, last_fn, last_ret);
atmel_release(link);
+ return -ENODEV;
}
/*======================================================================
@@ -476,7 +475,7 @@ static struct pcmcia_driver atmel_driver = {
.drv = {
.name = "atmel_cs",
},
- .probe = atmel_attach,
+ .probe = atmel_probe,
.remove = atmel_detach,
.id_table = atmel_ids,
.suspend = atmel_suspend,