UPSTREAM: usb: dwc3: of-simple: fix build warning on !PM
authorFelipe Balbi <balbi@ti.com>
Wed, 23 Dec 2015 03:56:10 +0000 (21:56 -0600)
committerWu Liang feng <wulf@rock-chips.com>
Sun, 6 Mar 2016 13:39:28 +0000 (21:39 +0800)
if we have a !PM kernel build, our runtime
suspend/resume callbacks will be left defined but
unused. Add a ifdef CONFIG_PM guard.

Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 5072cfc40a80cea3749fd3413b3896630d8c787e)

Change-Id: I6a7ceb1a90162b132afce17423888ab0cbdf897b
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
drivers/usb/dwc3/dwc3-of-simple.c

index 60c4c5a4430725eb2da32a1ecd680ddaef2c0254..9c9f7415506640c82626d62167c99f3124acbe0e 100644 (file)
@@ -122,6 +122,7 @@ static int dwc3_of_simple_remove(struct platform_device *pdev)
        return 0;
 }
 
+#ifdef CONFIG_PM
 static int dwc3_of_simple_runtime_suspend(struct device *dev)
 {
        struct dwc3_of_simple   *simple = dev_get_drvdata(dev);
@@ -150,6 +151,7 @@ static int dwc3_of_simple_runtime_resume(struct device *dev)
 
        return 0;
 }
+#endif
 
 static const struct dev_pm_ops dwc3_of_simple_dev_pm_ops = {
        SET_RUNTIME_PM_OPS(dwc3_of_simple_runtime_suspend,