diff options
Diffstat (limited to 'drivers/net')
-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: | |||
2048 | */ | 2048 | */ |
2049 | static int __devinit smc911x_drv_probe(struct platform_device *pdev) | 2049 | static 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); |