aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl3501_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:26:06 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:26:06 -0500
commit15b99ac1729503db9e6dc642a50b9b6cb3bf51f9 (patch)
treecfb8897487beba502aac2b28bc35066a87e34299 /drivers/net/wireless/wl3501_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/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);
103 * release a socket, in response to card insertion and ejection events. They 103 * release a socket, in response to card insertion and ejection events. They
104 * are invoked from the wl24 event handler. 104 * are invoked from the wl24 event handler.
105 */ 105 */
106static void wl3501_config(struct pcmcia_device *link); 106static int wl3501_config(struct pcmcia_device *link);
107static void wl3501_release(struct pcmcia_device *link); 107static void wl3501_release(struct pcmcia_device *link);
108 108
109/* 109/*
@@ -1920,7 +1920,7 @@ static const struct iw_handler_def wl3501_handler_def = {
1920 * The dev_link structure is initialized, but we don't actually configure the 1920 * The dev_link structure is initialized, but we don't actually configure the
1921 * card at this point -- we wait until we receive a card insertion event. 1921 * card at this point -- we wait until we receive a card insertion event.
1922 */ 1922 */
1923static int wl3501_attach(struct pcmcia_device *p_dev) 1923static int wl3501_probe(struct pcmcia_device *p_dev)
1924{ 1924{
1925 struct net_device *dev; 1925 struct net_device *dev;
1926 struct wl3501_card *this; 1926 struct wl3501_card *this;
@@ -1960,9 +1960,7 @@ static int wl3501_attach(struct pcmcia_device *p_dev)
1960 p_dev->priv = p_dev->irq.Instance = dev; 1960 p_dev->priv = p_dev->irq.Instance = dev;
1961 1961
1962 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 1962 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
1963 wl3501_config(p_dev); 1963 return wl3501_config(p_dev);
1964
1965 return 0;
1966out_link: 1964out_link:
1967 return -ENOMEM; 1965 return -ENOMEM;
1968} 1966}
@@ -1978,7 +1976,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
1978 * received, to configure the PCMCIA socket, and to make the ethernet device 1976 * received, to configure the PCMCIA socket, and to make the ethernet device
1979 * available to the system. 1977 * available to the system.
1980 */ 1978 */
1981static void wl3501_config(struct pcmcia_device *link) 1979static int wl3501_config(struct pcmcia_device *link)
1982{ 1980{
1983 tuple_t tuple; 1981 tuple_t tuple;
1984 cisparse_t parse; 1982 cisparse_t parse;
@@ -2082,13 +2080,13 @@ static void wl3501_config(struct pcmcia_device *link)
2082 spin_lock_init(&this->lock); 2080 spin_lock_init(&this->lock);
2083 init_waitqueue_head(&this->wait); 2081 init_waitqueue_head(&this->wait);
2084 netif_start_queue(dev); 2082 netif_start_queue(dev);
2085 goto out; 2083 return 0;
2084
2086cs_failed: 2085cs_failed:
2087 cs_error(link, last_fn, last_ret); 2086 cs_error(link, last_fn, last_ret);
2088failed: 2087failed:
2089 wl3501_release(link); 2088 wl3501_release(link);
2090out: 2089 return -ENODEV;
2091 return;
2092} 2090}
2093 2091
2094/** 2092/**
@@ -2146,7 +2144,7 @@ static struct pcmcia_driver wl3501_driver = {
2146 .drv = { 2144 .drv = {
2147 .name = "wl3501_cs", 2145 .name = "wl3501_cs",
2148 }, 2146 },
2149 .probe = wl3501_attach, 2147 .probe = wl3501_probe,
2150 .remove = wl3501_detach, 2148 .remove = wl3501_detach,
2151 .id_table = wl3501_ids, 2149 .id_table = wl3501_ids,
2152 .suspend = wl3501_suspend, 2150 .suspend = wl3501_suspend,