Commit 19fda7cd59eac8e537f63a4d9bd5973bf78a8c38

Authored by Jingoo Han
Committed by Felipe Balbi
1 parent 538bf07d89

usb: dwc3: add CONFIG_PM_SLEEP to suspend/resume functions

Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
build warning when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
when the CONFIG_PM_SLEEP is enabled. Unnecessary CONFIG_PM ifdefs
are removed.

drivers/usb/dwc3/core.c:682:12: warning: 'dwc3_suspend' defined but not used [-Wunused-function]
drivers/usb/dwc3/core.c:709:12: warning: 'dwc3_resume' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-omap.c:430:12: warning: 'dwc3_omap_suspend' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-omap.c:440:12: warning: 'dwc3_omap_resume' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-exynos.c:185:12: warning: 'dwc3_exynos_suspend' defined but not used [-Wunused-function]
drivers/usb/dwc3/dwc3-exynos.c:194:12: warning: 'dwc3_exynos_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>

Showing 3 changed files with 5 additions and 5 deletions Side-by-side Diff

drivers/usb/dwc3/core.c
... ... @@ -634,7 +634,7 @@
634 634 return 0;
635 635 }
636 636  
637   -#ifdef CONFIG_PM
  637 +#ifdef CONFIG_PM_SLEEP
638 638 static int dwc3_prepare(struct device *dev)
639 639 {
640 640 struct dwc3 *dwc = dev_get_drvdata(dev);
drivers/usb/dwc3/dwc3-exynos.c
... ... @@ -181,7 +181,7 @@
181 181 MODULE_DEVICE_TABLE(of, exynos_dwc3_match);
182 182 #endif
183 183  
184   -#ifdef CONFIG_PM
  184 +#ifdef CONFIG_PM_SLEEP
185 185 static int dwc3_exynos_suspend(struct device *dev)
186 186 {
187 187 struct dwc3_exynos *exynos = dev_get_drvdata(dev);
... ... @@ -212,7 +212,7 @@
212 212 #define DEV_PM_OPS (&dwc3_exynos_dev_pm_ops)
213 213 #else
214 214 #define DEV_PM_OPS NULL
215   -#endif /* CONFIG_PM */
  215 +#endif /* CONFIG_PM_SLEEP */
216 216  
217 217 static struct platform_driver dwc3_exynos_driver = {
218 218 .probe = dwc3_exynos_probe,
drivers/usb/dwc3/dwc3-omap.c
... ... @@ -410,7 +410,7 @@
410 410 };
411 411 MODULE_DEVICE_TABLE(of, of_dwc3_match);
412 412  
413   -#ifdef CONFIG_PM
  413 +#ifdef CONFIG_PM_SLEEP
414 414 static int dwc3_omap_prepare(struct device *dev)
415 415 {
416 416 struct dwc3_omap *omap = dev_get_drvdata(dev);
... ... @@ -461,7 +461,7 @@
461 461 #define DEV_PM_OPS (&dwc3_omap_dev_pm_ops)
462 462 #else
463 463 #define DEV_PM_OPS NULL
464   -#endif /* CONFIG_PM */
  464 +#endif /* CONFIG_PM_SLEEP */
465 465  
466 466 static struct platform_driver dwc3_omap_driver = {
467 467 .probe = dwc3_omap_probe,