Skip to content

Commit

Permalink
sh_eth: kill unneeded typecast in sh_eth_drv_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergei Shtylyov authored and David S. Miller committed Mar 21, 2013
1 parent dfed5e7 commit 564044b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/renesas/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 564044b

Please sign in to comment.