diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-10-21 22:00:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-21 21:10:12 -0700 |
commit | 9dd8360c763af52a8c6357f509c9a700ea3fc0bf (patch) | |
tree | f5b28f1b6400aece04cf9569554ecf147c085ca0 /drivers/net | |
parent | 3fcdaad316f204d6280a65cf80a7c21c9fd499c3 (diff) | |
download | linux-9dd8360c763af52a8c6357f509c9a700ea3fc0bf.tar.bz2 |
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: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/smsc/smc91x.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 8d6cff8bd162..4823b6a51134 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -2447,8 +2447,7 @@ static int smc_drv_remove(struct platform_device *pdev) static int smc_drv_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct net_device *ndev = platform_get_drvdata(pdev); + struct net_device *ndev = dev_get_drvdata(dev); if (ndev) { if (netif_running(ndev)) { |