|
@@ -2769,10 +2769,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
|
|
|
|
|
|
/* get base addr */
|
|
/* get base addr */
|
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
- if (unlikely(res == NULL)) {
|
|
|
|
- dev_err(&pdev->dev, "invalid resource\n");
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
|
|
|
|
ndev = alloc_etherdev(sizeof(struct sh_eth_private));
|
|
ndev = alloc_etherdev(sizeof(struct sh_eth_private));
|
|
if (!ndev)
|
|
if (!ndev)
|
|
@@ -2781,8 +2777,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
|
|
pm_runtime_enable(&pdev->dev);
|
|
pm_runtime_enable(&pdev->dev);
|
|
pm_runtime_get_sync(&pdev->dev);
|
|
pm_runtime_get_sync(&pdev->dev);
|
|
|
|
|
|
- /* The sh Ether-specific entries in the device structure. */
|
|
|
|
- ndev->base_addr = res->start;
|
|
|
|
devno = pdev->id;
|
|
devno = pdev->id;
|
|
if (devno < 0)
|
|
if (devno < 0)
|
|
devno = 0;
|
|
devno = 0;
|
|
@@ -2806,6 +2800,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
|
|
goto out_release;
|
|
goto out_release;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ndev->base_addr = res->start;
|
|
|
|
+
|
|
spin_lock_init(&mdp->lock);
|
|
spin_lock_init(&mdp->lock);
|
|
mdp->pdev = pdev;
|
|
mdp->pdev = pdev;
|
|
|
|
|