mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00:00
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>
This commit is contained in:
parent
fd568fc3fe
commit
a316084c2f
@ -2048,9 +2048,6 @@ err_out:
|
|||||||
*/
|
*/
|
||||||
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)
|
|||||||
lp = netdev_priv(ndev);
|
lp = netdev_priv(ndev);
|
||||||
lp->netdev = ndev;
|
lp->netdev = ndev;
|
||||||
#ifdef SMC_DYNAMIC_BUS_CONFIG
|
#ifdef SMC_DYNAMIC_BUS_CONFIG
|
||||||
if (!pd) {
|
{
|
||||||
ret = -EINVAL;
|
struct smc911x_platdata *pd = pdev->dev.platform_data;
|
||||||
goto release_both;
|
if (!pd) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user