[<prev] [next>] [day] [month] [year] [list]
Message-Id: <201303212339.22356.sergei.shtylyov@cogentembedded.com>
Date: Thu, 21 Mar 2013 23:39:22 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: netdev@...r.kernel.org
Cc: nobuhiro.iwamatsu.yj@...esas.com
Subject: [PATCH 2/3] 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@...entembedded.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -2351,7 +2351,7 @@ static int sh_eth_drv_probe(struct platf
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 platf
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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists