sh_eth: kill unneeded typecast in sh_eth_drv_probe()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Thu, 21 Mar 2013 10:39:22 +0000 (10:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Mar 2013 21:20:54 +0000 (17:20 -0400)
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>
drivers/net/ethernet/renesas/sh_eth.c

index a7b6c706236da63df162e024265967f590e6b911..0189bb07ae7f3358e76d5cffd47094068237eb4c 100644 (file)
@@ -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;