aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wavelan_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/wavelan_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/wavelan_cs.c')
-rw-r--r--drivers/net/wireless/wavelan_cs.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 352d4a50b799..7373caf6e8e8 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -4580,10 +4580,11 @@ wavelan_close(struct net_device * dev)
4580 * card insertion event. 4580 * card insertion event.
4581 */ 4581 */
4582static int 4582static int
4583wavelan_attach(struct pcmcia_device *p_dev) 4583wavelan_probe(struct pcmcia_device *p_dev)
4584{ 4584{
4585 struct net_device * dev; /* Interface generic data */ 4585 struct net_device * dev; /* Interface generic data */
4586 net_local * lp; /* Interface specific data */ 4586 net_local * lp; /* Interface specific data */
4587 int ret;
4587 4588
4588#ifdef DEBUG_CALLBACK_TRACE 4589#ifdef DEBUG_CALLBACK_TRACE
4589 printk(KERN_DEBUG "-> wavelan_attach()\n"); 4590 printk(KERN_DEBUG "-> wavelan_attach()\n");
@@ -4651,11 +4652,18 @@ wavelan_attach(struct pcmcia_device *p_dev)
4651 dev->mtu = WAVELAN_MTU; 4652 dev->mtu = WAVELAN_MTU;
4652 4653
4653 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 4654 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
4654 if(wv_pcmcia_config(p_dev) && 4655 ret = wv_pcmcia_config(p_dev);
4655 wv_hw_config(dev)) 4656 if (ret)
4656 wv_init_info(dev); 4657 return ret;
4657 else 4658
4659 ret = wv_hw_config(dev);
4660 if (ret) {
4658 dev->irq = 0; 4661 dev->irq = 0;
4662 pcmcia_disable_device(p_dev);
4663 return ret;
4664 }
4665
4666 wv_init_info(dev);
4659 4667
4660#ifdef DEBUG_CALLBACK_TRACE 4668#ifdef DEBUG_CALLBACK_TRACE
4661 printk(KERN_DEBUG "<- wavelan_attach()\n"); 4669 printk(KERN_DEBUG "<- wavelan_attach()\n");
@@ -4760,7 +4768,7 @@ static struct pcmcia_driver wavelan_driver = {
4760 .drv = { 4768 .drv = {
4761 .name = "wavelan_cs", 4769 .name = "wavelan_cs",
4762 }, 4770 },
4763 .probe = wavelan_attach, 4771 .probe = wavelan_probe,
4764 .remove = wavelan_detach, 4772 .remove = wavelan_detach,
4765 .id_table = wavelan_ids, 4773 .id_table = wavelan_ids,
4766 .suspend = wavelan_suspend, 4774 .suspend = wavelan_suspend,