diff options
Diffstat (limited to 'drivers/net/pcmcia/smc91c92_cs.c')
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index a4ee3057b831..3252c1dc9ee7 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -279,7 +279,7 @@ enum RxCfg { RxAllMulti = 0x0004, RxPromisc = 0x0002, | |||
279 | /*====================================================================*/ | 279 | /*====================================================================*/ |
280 | 280 | ||
281 | static void smc91c92_detach(struct pcmcia_device *p_dev); | 281 | static void smc91c92_detach(struct pcmcia_device *p_dev); |
282 | static void smc91c92_config(struct pcmcia_device *link); | 282 | static int smc91c92_config(struct pcmcia_device *link); |
283 | static void smc91c92_release(struct pcmcia_device *link); | 283 | static void smc91c92_release(struct pcmcia_device *link); |
284 | 284 | ||
285 | static int smc_open(struct net_device *dev); | 285 | static int smc_open(struct net_device *dev); |
@@ -309,7 +309,7 @@ static struct ethtool_ops ethtool_ops; | |||
309 | 309 | ||
310 | ======================================================================*/ | 310 | ======================================================================*/ |
311 | 311 | ||
312 | static int smc91c92_attach(struct pcmcia_device *link) | 312 | static int smc91c92_probe(struct pcmcia_device *link) |
313 | { | 313 | { |
314 | struct smc_private *smc; | 314 | struct smc_private *smc; |
315 | struct net_device *dev; | 315 | struct net_device *dev; |
@@ -357,9 +357,7 @@ static int smc91c92_attach(struct pcmcia_device *link) | |||
357 | smc->mii_if.reg_num_mask = 0x1f; | 357 | smc->mii_if.reg_num_mask = 0x1f; |
358 | 358 | ||
359 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 359 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
360 | smc91c92_config(link); | 360 | return smc91c92_config(link); |
361 | |||
362 | return 0; | ||
363 | } /* smc91c92_attach */ | 361 | } /* smc91c92_attach */ |
364 | 362 | ||
365 | /*====================================================================== | 363 | /*====================================================================== |
@@ -972,7 +970,7 @@ static int check_sig(struct pcmcia_device *link) | |||
972 | #define CS_EXIT_TEST(ret, svc, label) \ | 970 | #define CS_EXIT_TEST(ret, svc, label) \ |
973 | if (ret != CS_SUCCESS) { cs_error(link, svc, ret); goto label; } | 971 | if (ret != CS_SUCCESS) { cs_error(link, svc, ret); goto label; } |
974 | 972 | ||
975 | static void smc91c92_config(struct pcmcia_device *link) | 973 | static int smc91c92_config(struct pcmcia_device *link) |
976 | { | 974 | { |
977 | struct net_device *dev = link->priv; | 975 | struct net_device *dev = link->priv; |
978 | struct smc_private *smc = netdev_priv(dev); | 976 | struct smc_private *smc = netdev_priv(dev); |
@@ -1145,7 +1143,7 @@ static void smc91c92_config(struct pcmcia_device *link) | |||
1145 | } | 1143 | } |
1146 | } | 1144 | } |
1147 | kfree(cfg_mem); | 1145 | kfree(cfg_mem); |
1148 | return; | 1146 | return 0; |
1149 | 1147 | ||
1150 | config_undo: | 1148 | config_undo: |
1151 | unregister_netdev(dev); | 1149 | unregister_netdev(dev); |
@@ -1153,7 +1151,7 @@ config_failed: /* CS_EXIT_TEST() calls jump to here... */ | |||
1153 | smc91c92_release(link); | 1151 | smc91c92_release(link); |
1154 | link->state &= ~DEV_CONFIG_PENDING; | 1152 | link->state &= ~DEV_CONFIG_PENDING; |
1155 | kfree(cfg_mem); | 1153 | kfree(cfg_mem); |
1156 | 1154 | return -ENODEV; | |
1157 | } /* smc91c92_config */ | 1155 | } /* smc91c92_config */ |
1158 | 1156 | ||
1159 | /*====================================================================== | 1157 | /*====================================================================== |
@@ -2289,7 +2287,7 @@ static struct pcmcia_driver smc91c92_cs_driver = { | |||
2289 | .drv = { | 2287 | .drv = { |
2290 | .name = "smc91c92_cs", | 2288 | .name = "smc91c92_cs", |
2291 | }, | 2289 | }, |
2292 | .probe = smc91c92_attach, | 2290 | .probe = smc91c92_probe, |
2293 | .remove = smc91c92_detach, | 2291 | .remove = smc91c92_detach, |
2294 | .id_table = smc91c92_ids, | 2292 | .id_table = smc91c92_ids, |
2295 | .suspend = smc91c92_suspend, | 2293 | .suspend = smc91c92_suspend, |