summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl3501_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/wl3501_cs.c
parent[PATCH] pcmcia: remove dev_link_t and client_handle_t indirection (diff)
downloadlinux-15b99ac1729503db9e6dc642a50b9b6cb3bf51f9.tar.xz
linux-15b99ac1729503db9e6dc642a50b9b6cb3bf51f9.zip
[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/wl3501_cs.c')
-rw-r--r--drivers/net/wireless/wl3501_cs.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 752d22260080..6b3a605897bd 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -103,7 +103,7 @@ module_param(pc_debug, int, 0);
* release a socket, in response to card insertion and ejection events. They
* are invoked from the wl24 event handler.
*/
-static void wl3501_config(struct pcmcia_device *link);
+static int wl3501_config(struct pcmcia_device *link);
static void wl3501_release(struct pcmcia_device *link);
/*
@@ -1920,7 +1920,7 @@ static const struct iw_handler_def wl3501_handler_def = {
* The dev_link structure is initialized, but we don't actually configure the
* card at this point -- we wait until we receive a card insertion event.
*/
-static int wl3501_attach(struct pcmcia_device *p_dev)
+static int wl3501_probe(struct pcmcia_device *p_dev)
{
struct net_device *dev;
struct wl3501_card *this;
@@ -1960,9 +1960,7 @@ static int wl3501_attach(struct pcmcia_device *p_dev)
p_dev->priv = p_dev->irq.Instance = dev;
p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- wl3501_config(p_dev);
-
- return 0;
+ return wl3501_config(p_dev);
out_link:
return -ENOMEM;
}
@@ -1978,7 +1976,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
* received, to configure the PCMCIA socket, and to make the ethernet device
* available to the system.
*/
-static void wl3501_config(struct pcmcia_device *link)
+static int wl3501_config(struct pcmcia_device *link)
{
tuple_t tuple;
cisparse_t parse;
@@ -2082,13 +2080,13 @@ static void wl3501_config(struct pcmcia_device *link)
spin_lock_init(&this->lock);
init_waitqueue_head(&this->wait);
netif_start_queue(dev);
- goto out;
+ return 0;
+
cs_failed:
cs_error(link, last_fn, last_ret);
failed:
wl3501_release(link);
-out:
- return;
+ return -ENODEV;
}
/**
@@ -2146,7 +2144,7 @@ static struct pcmcia_driver wl3501_driver = {
.drv = {
.name = "wl3501_cs",
},
- .probe = wl3501_attach,
+ .probe = wl3501_probe,
.remove = wl3501_detach,
.id_table = wl3501_ids,
.suspend = wl3501_suspend,