Commit 564044b0 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller

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: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dfed5e7f
...@@ -2351,7 +2351,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev) ...@@ -2351,7 +2351,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
struct net_device *ndev = NULL; struct net_device *ndev = NULL;
struct sh_eth_private *mdp = 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 */ /* get base addr */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
...@@ -2401,7 +2401,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev) ...@@ -2401,7 +2401,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
pm_runtime_resume(&pdev->dev); pm_runtime_resume(&pdev->dev);
pd = (struct sh_eth_plat_data *)(pdev->dev.platform_data);
/* get PHY ID */ /* get PHY ID */
mdp->phy_id = pd->phy; mdp->phy_id = pd->phy;
mdp->phy_interface = pd->phy_interface; mdp->phy_interface = pd->phy_interface;
......
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