097-2-usb-dwc3-of-simple-fix-build-warning-on-PM.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 131386d63ca3177d471aa93808c69b85fdac520d Mon Sep 17 00:00:00 2001
  2. From: Felipe Balbi <balbi@ti.com>
  3. Date: Tue, 22 Dec 2015 21:56:10 -0600
  4. Subject: [PATCH] usb: dwc3: of-simple: fix build warning on !PM
  5. if we have a !PM kernel build, our runtime
  6. suspend/resume callbacks will be left defined but
  7. unused. Add a ifdef CONFIG_PM guard.
  8. Signed-off-by: Felipe Balbi <balbi@ti.com>
  9. (cherry picked from commit 5072cfc40a80cea3749fd3413b3896630d8c787e)
  10. Change-Id: I088186c33aa917ec8da2985372ceefc289b24242
  11. Signed-off-by: Nitheesh Sekar <nsekar@codeaurora.org>
  12. ---
  13. drivers/usb/dwc3/dwc3-of-simple.c | 2 ++
  14. 1 file changed, 2 insertions(+)
  15. --- a/drivers/usb/dwc3/dwc3-of-simple.c
  16. +++ b/drivers/usb/dwc3/dwc3-of-simple.c
  17. @@ -122,6 +122,7 @@ static int dwc3_of_simple_remove(struct
  18. return 0;
  19. }
  20. +#ifdef CONFIG_PM
  21. static int dwc3_of_simple_runtime_suspend(struct device *dev)
  22. {
  23. struct dwc3_of_simple *simple = dev_get_drvdata(dev);
  24. @@ -150,6 +151,7 @@ static int dwc3_of_simple_runtime_resume
  25. return 0;
  26. }
  27. +#endif
  28. static const struct dev_pm_ops dwc3_of_simple_dev_pm_ops = {
  29. SET_RUNTIME_PM_OPS(dwc3_of_simple_runtime_suspend,