Commit 717de370 authored by Wolfram Sang's avatar Wolfram Sang Committed by David S. Miller

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 63382e0a
...@@ -955,8 +955,7 @@ qca8k_set_pm(struct qca8k_priv *priv, int enable) ...@@ -955,8 +955,7 @@ qca8k_set_pm(struct qca8k_priv *priv, int enable)
static int qca8k_suspend(struct device *dev) static int qca8k_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct qca8k_priv *priv = dev_get_drvdata(dev);
struct qca8k_priv *priv = platform_get_drvdata(pdev);
qca8k_set_pm(priv, 0); qca8k_set_pm(priv, 0);
...@@ -965,8 +964,7 @@ static int qca8k_suspend(struct device *dev) ...@@ -965,8 +964,7 @@ static int qca8k_suspend(struct device *dev)
static int qca8k_resume(struct device *dev) static int qca8k_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct qca8k_priv *priv = dev_get_drvdata(dev);
struct qca8k_priv *priv = platform_get_drvdata(pdev);
qca8k_set_pm(priv, 1); qca8k_set_pm(priv, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment