diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-10-21 22:00:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-21 21:10:11 -0700 |
commit | 717de3705dc4cf37d88392e1bdfb0135bd3ac2df (patch) | |
tree | 6adf8195dee69cd992a8ed4e134071e00f6c1c88 /drivers/net/dsa | |
parent | 63382e0afeda1da79fe0c1ebcfbb6fb38e530fa1 (diff) | |
download | linux-717de3705dc4cf37d88392e1bdfb0135bd3ac2df.tar.bz2 |
net: dsa: qca8k: 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>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r-- | drivers/net/dsa/qca8k.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index cdcde7f8e0b2..7e97e620bd44 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -955,8 +955,7 @@ qca8k_set_pm(struct qca8k_priv *priv, int enable) static int qca8k_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct qca8k_priv *priv = platform_get_drvdata(pdev); + struct qca8k_priv *priv = dev_get_drvdata(dev); qca8k_set_pm(priv, 0); @@ -965,8 +964,7 @@ static int qca8k_suspend(struct device *dev) static int qca8k_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct qca8k_priv *priv = platform_get_drvdata(pdev); + struct qca8k_priv *priv = dev_get_drvdata(dev); qca8k_set_pm(priv, 1); |