phy: dm816x: use __maybe_unused to hide pm functions
authorArnd Bergmann <arnd@arndb.de>
Wed, 2 Mar 2016 15:24:07 +0000 (16:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Mar 2016 04:37:41 +0000 (20:37 -0800)
The dm816x USB PHY driver uses UNIVERSAL_DEV_PM_OPS to access
its suspend/resume functions, which causes a warning about
unused symbols when CONFIG_PM is disabled:

drivers/phy/phy-dm816x-usb.c:121:12: error: 'dm816x_usb_phy_runtime_suspend' defined but not used [-Werror=unused-function]
drivers/phy/phy-dm816x-usb.c:139:12: error: 'dm816x_usb_phy_runtime_resume' defined but not used [-Werror=unused-function]

This adds __maybe_unused annotations to let the compiler know
it can silently drop the function definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/phy-dm816x-usb.c

index b4bbef664d206b4a73cd665986bd12eb988de285..cbcce7cf0028e138e22cd9372188401fda45be48 100644 (file)
@@ -118,7 +118,7 @@ static const struct phy_ops ops = {
        .owner          = THIS_MODULE,
 };
 
-static int dm816x_usb_phy_runtime_suspend(struct device *dev)
+static int __maybe_unused dm816x_usb_phy_runtime_suspend(struct device *dev)
 {
        struct dm816x_usb_phy *phy = dev_get_drvdata(dev);
        unsigned int mask, val;
@@ -136,7 +136,7 @@ static int dm816x_usb_phy_runtime_suspend(struct device *dev)
        return 0;
 }
 
-static int dm816x_usb_phy_runtime_resume(struct device *dev)
+static int __maybe_unused dm816x_usb_phy_runtime_resume(struct device *dev)
 {
        struct dm816x_usb_phy *phy = dev_get_drvdata(dev);
        unsigned int mask, val;