diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-10-21 22:00:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-21 21:10:12 -0700 |
commit | 44f5ccdbc97debd03d10c1b0fde3f60e2294f001 (patch) | |
tree | 97155f28a30e46803e3bdaf71aac806f52c5fdb0 /drivers/net/ethernet/wiznet | |
parent | 762b9e9abb58375ba7eb06c3522c777debebe289 (diff) | |
download | linux-44f5ccdbc97debd03d10c1b0fde3f60e2294f001.tar.bz2 |
net: ethernet: wiznet: w5300: 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/ethernet/wiznet')
-rw-r--r-- | drivers/net/ethernet/wiznet/w5300.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c index 80fdbff67d82..f9da5d6172e3 100644 --- a/drivers/net/ethernet/wiznet/w5300.c +++ b/drivers/net/ethernet/wiznet/w5300.c @@ -661,8 +661,7 @@ static int w5300_remove(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int w5300_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); struct w5300_priv *priv = netdev_priv(ndev); if (netif_running(ndev)) { @@ -676,8 +675,7 @@ static int w5300_suspend(struct device *dev) static int w5300_resume(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); struct w5300_priv *priv = netdev_priv(ndev); if (!netif_running(ndev)) { |