Commit 86fc3f70 authored by Vaibhav Gupta's avatar Vaibhav Gupta Committed by David S. Miller

sun/niu: add __maybe_unused attribute to PM functions

The upgraded .suspend() and .resume() throw
"defined but not used [-Wunused-function]" warning for certain
configurations.

Mark them with "__maybe_unused" attribute.

Compile-tested only.

Fixes: b0db0cc2 ("sun/niu: use generic power management")
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8658e58
...@@ -9873,7 +9873,7 @@ static void niu_pci_remove_one(struct pci_dev *pdev) ...@@ -9873,7 +9873,7 @@ static void niu_pci_remove_one(struct pci_dev *pdev)
} }
} }
static int niu_suspend(struct device *dev_d) static int __maybe_unused niu_suspend(struct device *dev_d)
{ {
struct net_device *dev = dev_get_drvdata(dev_d); struct net_device *dev = dev_get_drvdata(dev_d);
struct niu *np = netdev_priv(dev); struct niu *np = netdev_priv(dev);
...@@ -9900,7 +9900,7 @@ static int niu_suspend(struct device *dev_d) ...@@ -9900,7 +9900,7 @@ static int niu_suspend(struct device *dev_d)
return 0; return 0;
} }
static int niu_resume(struct device *dev_d) static int __maybe_unused niu_resume(struct device *dev_d)
{ {
struct net_device *dev = dev_get_drvdata(dev_d); struct net_device *dev = dev_get_drvdata(dev_d);
struct niu *np = netdev_priv(dev); struct niu *np = netdev_priv(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