提交 9dd8360c 编写于 作者: W Wolfram Sang 提交者: David S. Miller

net: ethernet: smsc: smc91x: simplify getting .driver_data

We should get 'driver_data' from 'struct device' directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3fcdaad3
...@@ -2447,8 +2447,7 @@ static int smc_drv_remove(struct platform_device *pdev) ...@@ -2447,8 +2447,7 @@ static int smc_drv_remove(struct platform_device *pdev)
static int smc_drv_suspend(struct device *dev) static int smc_drv_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct net_device *ndev = dev_get_drvdata(dev);
struct net_device *ndev = platform_get_drvdata(pdev);
if (ndev) { if (ndev) {
if (netif_running(ndev)) { if (netif_running(ndev)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册