diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2008-12-01 13:24:46 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 06:05:49 +0100 |
commit | a316084c2f18fd5371f81cfcfc8348a71c4a6fe8 (patch) | |
tree | 3125a56353392c48d7cd7bfcbce1eb05633a5fba /drivers/net/smc911x.c | |
parent | drivers/isdn/mISDN: use ARRAY_SIZE (diff) | |
download | linux-a316084c2f18fd5371f81cfcfc8348a71c4a6fe8.tar.xz linux-a316084c2f18fd5371f81cfcfc8348a71c4a6fe8.zip |
drivers/net/smc911x.c: smc911x_drv_probe() cleanup
Save an ugly ifdef.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smc911x.c')
-rw-r--r-- | drivers/net/smc911x.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 21d823c0892c..bf3aa2a1effe 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -2048,9 +2048,6 @@ err_out: */ static int __devinit smc911x_drv_probe(struct platform_device *pdev) { -#ifdef SMC_DYNAMIC_BUS_CONFIG - struct smc911x_platdata *pd = pdev->dev.platform_data; -#endif struct net_device *ndev; struct resource *res; struct smc911x_local *lp; @@ -2085,11 +2082,14 @@ static int __devinit smc911x_drv_probe(struct platform_device *pdev) lp = netdev_priv(ndev); lp->netdev = ndev; #ifdef SMC_DYNAMIC_BUS_CONFIG - if (!pd) { - ret = -EINVAL; - goto release_both; + { + struct smc911x_platdata *pd = pdev->dev.platform_data; + if (!pd) { + ret = -EINVAL; + goto release_both; + } + memcpy(&lp->cfg, pd, sizeof(lp->cfg)); } - memcpy(&lp->cfg, pd, sizeof(lp->cfg)); #endif addr = ioremap(res->start, SMC911X_IO_EXTENT); |