From: Fabio Estevam Date: Wed, 19 Nov 2014 14:37:53 +0000 (-0200) Subject: usb: dwc2: Fix build warning when CONFIG_PM_SLEEP=n X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=da9f3289c74f93b63c5ca741caa4e2d728ccafba;p=openwrt%2Fstaging%2Fblogic.git usb: dwc2: Fix build warning when CONFIG_PM_SLEEP=n 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 Signed-off-by: Fabio Estevam Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ec5658ac52ba..6a795aa2ff05 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -226,7 +226,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; @@ -236,7 +236,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;