net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused

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: b78ac6ecd1 ("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>
This commit is contained in:
Arnd Bergmann 2018-09-26 15:14:10 +02:00 committed by David S. Miller
parent 31bae7dad3
commit 9b97123a58
1 changed files with 2 additions and 2 deletions

View File

@ -318,7 +318,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);
@ -327,7 +327,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;