Commit 9dd8360c authored by Wolfram Sang's avatar Wolfram Sang Committed by David S. Miller
Browse files

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3fcdaad3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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)) {