aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/fmvj18x_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/fmvj18x_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/fmvj18x_cs.c')
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index ad3e490bb016..d9c83b290095 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -84,7 +84,7 @@ static char *version = DRV_NAME ".c " DRV_VERSION " 2002/03/23";
84/* 84/*
85 PCMCIA event handlers 85 PCMCIA event handlers
86 */ 86 */
87static void fmvj18x_config(struct pcmcia_device *link); 87static int fmvj18x_config(struct pcmcia_device *link);
88static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id); 88static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id);
89static int fmvj18x_setup_mfc(struct pcmcia_device *link); 89static int fmvj18x_setup_mfc(struct pcmcia_device *link);
90static void fmvj18x_release(struct pcmcia_device *link); 90static void fmvj18x_release(struct pcmcia_device *link);
@@ -228,7 +228,7 @@ typedef struct local_info_t {
228#define BANK_1U 0x24 /* bank 1 (CONFIG_1) */ 228#define BANK_1U 0x24 /* bank 1 (CONFIG_1) */
229#define BANK_2U 0x28 /* bank 2 (CONFIG_1) */ 229#define BANK_2U 0x28 /* bank 2 (CONFIG_1) */
230 230
231static int fmvj18x_attach(struct pcmcia_device *link) 231static int fmvj18x_probe(struct pcmcia_device *link)
232{ 232{
233 local_info_t *lp; 233 local_info_t *lp;
234 struct net_device *dev; 234 struct net_device *dev;
@@ -273,9 +273,7 @@ static int fmvj18x_attach(struct pcmcia_device *link)
273 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); 273 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
274 274
275 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 275 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
276 fmvj18x_config(link); 276 return fmvj18x_config(link);
277
278 return 0;
279} /* fmvj18x_attach */ 277} /* fmvj18x_attach */
280 278
281/*====================================================================*/ 279/*====================================================================*/
@@ -339,7 +337,7 @@ static int ungermann_try_io_port(struct pcmcia_device *link)
339 return ret; /* RequestIO failed */ 337 return ret; /* RequestIO failed */
340} 338}
341 339
342static void fmvj18x_config(struct pcmcia_device *link) 340static int fmvj18x_config(struct pcmcia_device *link)
343{ 341{
344 struct net_device *dev = link->priv; 342 struct net_device *dev = link->priv;
345 local_info_t *lp = netdev_priv(dev); 343 local_info_t *lp = netdev_priv(dev);
@@ -552,7 +550,7 @@ static void fmvj18x_config(struct pcmcia_device *link)
552 for (i = 0; i < 6; i++) 550 for (i = 0; i < 6; i++)
553 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n")); 551 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n"));
554 552
555 return; 553 return 0;
556 554
557cs_failed: 555cs_failed:
558 /* All Card Services errors end up here */ 556 /* All Card Services errors end up here */
@@ -560,7 +558,7 @@ cs_failed:
560failed: 558failed:
561 fmvj18x_release(link); 559 fmvj18x_release(link);
562 link->state &= ~DEV_CONFIG_PENDING; 560 link->state &= ~DEV_CONFIG_PENDING;
563 561 return -ENODEV;
564} /* fmvj18x_config */ 562} /* fmvj18x_config */
565/*====================================================================*/ 563/*====================================================================*/
566 564
@@ -720,7 +718,7 @@ static struct pcmcia_driver fmvj18x_cs_driver = {
720 .drv = { 718 .drv = {
721 .name = "fmvj18x_cs", 719 .name = "fmvj18x_cs",
722 }, 720 },
723 .probe = fmvj18x_attach, 721 .probe = fmvj18x_probe,
724 .remove = fmvj18x_detach, 722 .remove = fmvj18x_detach,
725 .id_table = fmvj18x_ids, 723 .id_table = fmvj18x_ids,
726 .suspend = fmvj18x_suspend, 724 .suspend = fmvj18x_suspend,