summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2013-03-21 14:39:22 +0400
committerDavid S. Miller <davem@davemloft.net>2013-03-22 01:20:54 +0400
commit564044b0928d46a87774c246ae80cb3cead9264d (patch)
tree22e8191cf97f0453c47577bb131f1f96d7001aa3 /drivers/net/ethernet
parentdfed5e7fb4ec946694cad7400d75c44f3bb7f645 (diff)
downloadlinux-564044b0928d46a87774c246ae80cb3cead9264d.tar.xz
sh_eth: kill unneeded typecast in sh_eth_drv_probe()
sh_eth_drv_probe() does cast from 'void *' when assigning to the 'pd' variable which is automatic anyway. Turn the assignment into initializer, while removing the cast... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index a7b6c706236d..0189bb07ae7f 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -2351,7 +2351,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
struct resource *res;
struct net_device *ndev = NULL;
struct sh_eth_private *mdp = NULL;
- struct sh_eth_plat_data *pd;
+ struct sh_eth_plat_data *pd = pdev->dev.platform_data;
/* get base addr */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -2401,7 +2401,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
pm_runtime_resume(&pdev->dev);
- pd = (struct sh_eth_plat_data *)(pdev->dev.platform_data);
/* get PHY ID */
mdp->phy_id = pd->phy;
mdp->phy_interface = pd->phy_interface;