aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/axnet_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/pcmcia/axnet_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/pcmcia/axnet_cs.c')
-rw-r--r--drivers/net/pcmcia/axnet_cs.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 88f180e98e81..f6ca85d77c7d 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -86,7 +86,7 @@ static char *version =
86 86
87/*====================================================================*/ 87/*====================================================================*/
88 88
89static void axnet_config(struct pcmcia_device *link); 89static int axnet_config(struct pcmcia_device *link);
90static void axnet_release(struct pcmcia_device *link); 90static void axnet_release(struct pcmcia_device *link);
91static int axnet_open(struct net_device *dev); 91static int axnet_open(struct net_device *dev);
92static int axnet_close(struct net_device *dev); 92static int axnet_close(struct net_device *dev);
@@ -142,7 +142,7 @@ static inline axnet_dev_t *PRIV(struct net_device *dev)
142 142
143======================================================================*/ 143======================================================================*/
144 144
145static int axnet_attach(struct pcmcia_device *link) 145static int axnet_probe(struct pcmcia_device *link)
146{ 146{
147 axnet_dev_t *info; 147 axnet_dev_t *info;
148 struct net_device *dev; 148 struct net_device *dev;
@@ -169,9 +169,7 @@ static int axnet_attach(struct pcmcia_device *link)
169 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); 169 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
170 170
171 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 171 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
172 axnet_config(link); 172 return axnet_config(link);
173
174 return 0;
175} /* axnet_attach */ 173} /* axnet_attach */
176 174
177/*====================================================================== 175/*======================================================================
@@ -288,7 +286,7 @@ static int try_io_port(struct pcmcia_device *link)
288 } 286 }
289} 287}
290 288
291static void axnet_config(struct pcmcia_device *link) 289static int axnet_config(struct pcmcia_device *link)
292{ 290{
293 struct net_device *dev = link->priv; 291 struct net_device *dev = link->priv;
294 axnet_dev_t *info = PRIV(dev); 292 axnet_dev_t *info = PRIV(dev);
@@ -425,14 +423,14 @@ static void axnet_config(struct pcmcia_device *link)
425 } else { 423 } else {
426 printk(KERN_NOTICE " No MII transceivers found!\n"); 424 printk(KERN_NOTICE " No MII transceivers found!\n");
427 } 425 }
428 return; 426 return 0;
429 427
430cs_failed: 428cs_failed:
431 cs_error(link, last_fn, last_ret); 429 cs_error(link, last_fn, last_ret);
432failed: 430failed:
433 axnet_release(link); 431 axnet_release(link);
434 link->state &= ~DEV_CONFIG_PENDING; 432 link->state &= ~DEV_CONFIG_PENDING;
435 return; 433 return -ENODEV;
436} /* axnet_config */ 434} /* axnet_config */
437 435
438/*====================================================================== 436/*======================================================================
@@ -806,7 +804,7 @@ static struct pcmcia_driver axnet_cs_driver = {
806 .drv = { 804 .drv = {
807 .name = "axnet_cs", 805 .name = "axnet_cs",
808 }, 806 },
809 .probe = axnet_attach, 807 .probe = axnet_probe,
810 .remove = axnet_detach, 808 .remove = axnet_detach,
811 .id_table = axnet_ids, 809 .id_table = axnet_ids,
812 .suspend = axnet_suspend, 810 .suspend = axnet_suspend,