ipq806x: sync with latest patches sent by QCA
[openwrt/openwrt.git] / target / linux / ipq806x / patches-4.4 / 098-usb-dwc3-of-simple-fix-build-warning-on-PM.patch
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
6 if we have a !PM kernel build, our runtime
7 suspend/resume callbacks will be left defined but
8 unused. Add a ifdef CONFIG_PM guard.
9
10 Signed-off-by: Felipe Balbi <balbi@ti.com>
11 (cherry picked from commit 5072cfc40a80cea3749fd3413b3896630d8c787e)
12
13 Change-Id: I088186c33aa917ec8da2985372ceefc289b24242
14 Signed-off-by: Nitheesh Sekar <nsekar@codeaurora.org>
15 ---
16 drivers/usb/dwc3/dwc3-of-simple.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19 diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
20 index 60c4c5a..9c9f741 100644
21 --- a/drivers/usb/dwc3/dwc3-of-simple.c
22 +++ b/drivers/usb/dwc3/dwc3-of-simple.c
23 @@ -122,6 +122,7 @@ static int dwc3_of_simple_remove(struct platform_device *pdev)
24 return 0;
25 }
26
27 +#ifdef CONFIG_PM
28 static int dwc3_of_simple_runtime_suspend(struct device *dev)
29 {
30 struct dwc3_of_simple *simple = dev_get_drvdata(dev);
31 @@ -150,6 +151,7 @@ static int dwc3_of_simple_runtime_resume(struct device *dev)
32
33 return 0;
34 }
35 +#endif
36
37 static const struct dev_pm_ops dwc3_of_simple_dev_pm_ops = {
38 SET_RUNTIME_PM_OPS(dwc3_of_simple_runtime_suspend,
39 --
40 2.7.2
41