aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap
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/hostap
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/hostap')
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 89b178106edf..88dc383a3da7 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -501,16 +501,20 @@ static struct prism2_helper_functions prism2_pccard_funcs =
501 501
502/* allocate local data and register with CardServices 502/* allocate local data and register with CardServices
503 * initialize dev_link structure, but do not configure the card yet */ 503 * initialize dev_link structure, but do not configure the card yet */
504static int prism2_attach(struct pcmcia_device *p_dev) 504static int hostap_cs_probe(struct pcmcia_device *p_dev)
505{ 505{
506 int ret;
507
506 PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info); 508 PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info);
507 p_dev->conf.IntType = INT_MEMORY_AND_IO; 509 p_dev->conf.IntType = INT_MEMORY_AND_IO;
508 510
509 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 511 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
510 if (prism2_config(p_dev)) 512 ret = prism2_config(p_dev);
513 if (ret) {
511 PDEBUG(DEBUG_EXTRA, "prism2_config() failed\n"); 514 PDEBUG(DEBUG_EXTRA, "prism2_config() failed\n");
515 }
512 516
513 return 0; 517 return ret;
514} 518}
515 519
516 520
@@ -894,7 +898,7 @@ static struct pcmcia_driver hostap_driver = {
894 .drv = { 898 .drv = {
895 .name = "hostap_cs", 899 .name = "hostap_cs",
896 }, 900 },
897 .probe = prism2_attach, 901 .probe = hostap_cs_probe,
898 .remove = prism2_detach, 902 .remove = prism2_detach,
899 .owner = THIS_MODULE, 903 .owner = THIS_MODULE,
900 .id_table = hostap_cs_ids, 904 .id_table = hostap_cs_ids,