aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc911x.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-12-01 07:24:46 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-04 00:05:49 -0500
commita316084c2f18fd5371f81cfcfc8348a71c4a6fe8 (patch)
tree3125a56353392c48d7cd7bfcbce1eb05633a5fba /drivers/net/smc911x.c
parentfd568fc3fe46fd87087717811d2f9ed27bb71558 (diff)
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.c14
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:
2048 */ 2048 */
2049static int __devinit smc911x_drv_probe(struct platform_device *pdev) 2049static int __devinit smc911x_drv_probe(struct platform_device *pdev)
2050{ 2050{
2051#ifdef SMC_DYNAMIC_BUS_CONFIG
2052 struct smc911x_platdata *pd = pdev->dev.platform_data;
2053#endif
2054 struct net_device *ndev; 2051 struct net_device *ndev;
2055 struct resource *res; 2052 struct resource *res;
2056 struct smc911x_local *lp; 2053 struct smc911x_local *lp;
@@ -2085,11 +2082,14 @@ static int __devinit smc911x_drv_probe(struct platform_device *pdev)
2085 lp = netdev_priv(ndev); 2082 lp = netdev_priv(ndev);
2086 lp->netdev = ndev; 2083 lp->netdev = ndev;
2087#ifdef SMC_DYNAMIC_BUS_CONFIG 2084#ifdef SMC_DYNAMIC_BUS_CONFIG
2088 if (!pd) { 2085 {
2089 ret = -EINVAL; 2086 struct smc911x_platdata *pd = pdev->dev.platform_data;
2090 goto release_both; 2087 if (!pd) {
2088 ret = -EINVAL;
2089 goto release_both;
2090 }
2091 memcpy(&lp->cfg, pd, sizeof(lp->cfg));
2091 } 2092 }
2092 memcpy(&lp->cfg, pd, sizeof(lp->cfg));
2093#endif 2093#endif
2094 2094
2095 addr = ioremap(res->start, SMC911X_IO_EXTENT); 2095 addr = ioremap(res->start, SMC911X_IO_EXTENT);