Building with bcm2835_defconfig, which has CONFIG_PM_SLEEP=n causes the 
following build warning:

drivers/usb/dwc2/platform.c:227:12: warning: 'dwc2_suspend' defined but not 
used [-Wunused-function]
drivers/usb/dwc2/platform.c:237:12: warning: 'dwc2_resume' defined but not used 
[-Wunused-function]

Annotate these functions with '__maybe_unused' to prevent the warnings.

Reported-by: Olof's autobuilder <bu...@lixom.net>
Signed-off-by: Fabio Estevam <fabio.este...@freescale.com>
---
 drivers/usb/dwc2/platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
index 57eb8a3..ff0ed0b 100644
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
@@ -224,7 +224,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
        return retval;
 }
 
-static int dwc2_suspend(struct device *dev)
+static int __maybe_unused dwc2_suspend(struct device *dev)
 {
        struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev);
        int ret = 0;
@@ -234,7 +234,7 @@ static int dwc2_suspend(struct device *dev)
        return ret;
 }
 
-static int dwc2_resume(struct device *dev)
+static int __maybe_unused dwc2_resume(struct device *dev)
 {
        struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev);
        int ret = 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to