usb: dwc3: of-simple: mark PM functions as __maybe_unused
Subsystems (2)
PATCH 1/1 usb: dwc3: of-simple: mark PM functions as __maybe_unused
The suspend/resume functions are not referenced when power messagement
is enabled:
CC drivers/video/fbdev/matrox/matroxfb_DAC1064.odrivers/usb/dwc3/dwc3-of-simple.c:223:12: warning: ‘dwc3_of_simple_resume’ defined but not used [-Wunused-function]
static int dwc3_of_simple_resume(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/dwc3-of-simple.c:213:12: warning: ‘dwc3_of_simple_suspend’ defined but not used [-Wunused-function]
static int dwc3_of_simple_suspend(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~This marks them as __maybe_unused to let the compiler drop the function without complaining.
Fixes 76251db86561 ("usb: dwc3: of-simple: reset host controller at suspend/resume")
Signed-off-by Anders Roxell <[email protected]>
--- drivers/usb/dwc3/dwc3-of-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc3/dwc3-of-simple.c +2 -2
@@ -210,7 +210,7 @@ static int dwc3_of_simple_runtime_resume(struct device *dev)return 0 ; } -static int dwc3_of_simple_suspend (struct device *dev) +static int __maybe_unused dwc3_of_simple_suspend (struct device *dev) {struct dwc3_of_simple *simple =dev_get_drvdata (dev);
@@ -220,7 +220,7 @@ static int dwc3_of_simple_suspend(struct device *dev)return 0 ; } -static int dwc3_of_simple_resume (struct device *dev) +static int __maybe_unused dwc3_of_simple_resume (struct device *dev) {struct dwc3_of_simple *simple =dev_get_drvdata (dev);