summaryrefslogtreecommitdiff
path: root/drivers/net/phy/mdio-bcm-unimac.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-09-26 15:14:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-20 18:00:53 +0100
commit7fdedf0c8d8eb93390c94533057d0666a10efd9e (patch)
treeb475ddefa692ac2efd7d33b1e6aa1d3d92f3f6f8 /drivers/net/phy/mdio-bcm-unimac.c
parent24adb0e7d14b59266993b548de9ea2b60ea85570 (diff)
net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused
[ Upstream commit 9b97123a584f60a5bca5a2663485768a1f6cd0a4 ] The newly added runtime-pm support causes a harmless warning when CONFIG_PM is disabled: drivers/net/phy/mdio-bcm-unimac.c:330:12: error: 'unimac_mdio_resume' defined but not used [-Werror=unused-function] static int unimac_mdio_resume(struct device *d) drivers/net/phy/mdio-bcm-unimac.c:321:12: error: 'unimac_mdio_suspend' defined but not used [-Werror=unused-function] static int unimac_mdio_suspend(struct device *d) Marking the functions as __maybe_unused is the easiest workaround and avoids adding #ifdef checks. Fixes: b78ac6ecd1b6 ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/phy/mdio-bcm-unimac.c')
-rw-r--r--drivers/net/phy/mdio-bcm-unimac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/mdio-bcm-unimac.c b/drivers/net/phy/mdio-bcm-unimac.c
index f9d98a6e67bc..52703bbd4d66 100644
--- a/drivers/net/phy/mdio-bcm-unimac.c
+++ b/drivers/net/phy/mdio-bcm-unimac.c
@@ -316,7 +316,7 @@ static int unimac_mdio_remove(struct platform_device *pdev)
return 0;
}
-static int unimac_mdio_suspend(struct device *d)
+static int __maybe_unused unimac_mdio_suspend(struct device *d)
{
struct unimac_mdio_priv *priv = dev_get_drvdata(d);
@@ -325,7 +325,7 @@ static int unimac_mdio_suspend(struct device *d)
return 0;
}
-static int unimac_mdio_resume(struct device *d)
+static int __maybe_unused unimac_mdio_resume(struct device *d)
{
struct unimac_mdio_priv *priv = dev_get_drvdata(d);
int ret;