Commit a316084c authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

drivers/net/smc911x.c: smc911x_drv_probe() cleanup

Save an ugly ifdef.
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd568fc3
...@@ -2048,9 +2048,6 @@ static int __devinit smc911x_probe(struct net_device *dev) ...@@ -2048,9 +2048,6 @@ static int __devinit smc911x_probe(struct net_device *dev)
*/ */
static int __devinit smc911x_drv_probe(struct platform_device *pdev) 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 net_device *ndev;
struct resource *res; struct resource *res;
struct smc911x_local *lp; struct smc911x_local *lp;
...@@ -2085,11 +2082,14 @@ static int __devinit smc911x_drv_probe(struct platform_device *pdev) ...@@ -2085,11 +2082,14 @@ static int __devinit smc911x_drv_probe(struct platform_device *pdev)
lp = netdev_priv(ndev); lp = netdev_priv(ndev);
lp->netdev = ndev; lp->netdev = ndev;
#ifdef SMC_DYNAMIC_BUS_CONFIG #ifdef SMC_DYNAMIC_BUS_CONFIG
{
struct smc911x_platdata *pd = pdev->dev.platform_data;
if (!pd) { if (!pd) {
ret = -EINVAL; ret = -EINVAL;
goto release_both; goto release_both;
} }
memcpy(&lp->cfg, pd, sizeof(lp->cfg)); memcpy(&lp->cfg, pd, sizeof(lp->cfg));
}
#endif #endif
addr = ioremap(res->start, SMC911X_IO_EXTENT); addr = ioremap(res->start, SMC911X_IO_EXTENT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment