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

net: macb: 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 64c40525
...@@ -4354,8 +4354,7 @@ static int __maybe_unused macb_resume(struct device *dev) ...@@ -4354,8 +4354,7 @@ static int __maybe_unused macb_resume(struct device *dev)
static int __maybe_unused macb_runtime_suspend(struct device *dev) static int __maybe_unused macb_runtime_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct net_device *netdev = dev_get_drvdata(dev);
struct net_device *netdev = platform_get_drvdata(pdev);
struct macb *bp = netdev_priv(netdev); struct macb *bp = netdev_priv(netdev);
if (!(device_may_wakeup(&bp->dev->dev))) { if (!(device_may_wakeup(&bp->dev->dev))) {
...@@ -4371,8 +4370,7 @@ static int __maybe_unused macb_runtime_suspend(struct device *dev) ...@@ -4371,8 +4370,7 @@ static int __maybe_unused macb_runtime_suspend(struct device *dev)
static int __maybe_unused macb_runtime_resume(struct device *dev) static int __maybe_unused macb_runtime_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct net_device *netdev = dev_get_drvdata(dev);
struct net_device *netdev = platform_get_drvdata(pdev);
struct macb *bp = netdev_priv(netdev); struct macb *bp = netdev_priv(netdev);
if (!(device_may_wakeup(&bp->dev->dev))) { if (!(device_may_wakeup(&bp->dev->dev))) {
......
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