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.

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....@samsung.com>
---
 drivers/usb/dwc3/core.c        |    2 ++
 drivers/usb/dwc3/dwc3-exynos.c |    2 ++
 drivers/usb/dwc3/dwc3-omap.c   |    2 ++
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index e2325ad..10729ff 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -679,6 +679,7 @@ static void dwc3_complete(struct device *dev)
        spin_unlock_irqrestore(&dwc->lock, flags);
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int dwc3_suspend(struct device *dev)
 {
        struct dwc3     *dwc = dev_get_drvdata(dev);
@@ -738,6 +739,7 @@ static int dwc3_resume(struct device *dev)
 
        return 0;
 }
+#endif
 
 static const struct dev_pm_ops dwc3_dev_pm_ops = {
        .prepare        = dwc3_prepare,
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index 1ea7bd8..f7806f0 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -182,6 +182,7 @@ MODULE_DEVICE_TABLE(of, exynos_dwc3_match);
 #endif
 
 #ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int dwc3_exynos_suspend(struct device *dev)
 {
        struct dwc3_exynos *exynos = dev_get_drvdata(dev);
@@ -204,6 +205,7 @@ static int dwc3_exynos_resume(struct device *dev)
 
        return 0;
 }
+#endif
 
 static const struct dev_pm_ops dwc3_exynos_dev_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(dwc3_exynos_suspend, dwc3_exynos_resume)
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 6de734f..9620d7d 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -427,6 +427,7 @@ static void dwc3_omap_complete(struct device *dev)
        dwc3_omap_enable_irqs(omap);
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int dwc3_omap_suspend(struct device *dev)
 {
        struct dwc3_omap        *omap = dev_get_drvdata(dev);
@@ -450,6 +451,7 @@ static int dwc3_omap_resume(struct device *dev)
 
        return 0;
 }
+#endif
 
 static const struct dev_pm_ops dwc3_omap_dev_pm_ops = {
        .prepare        = dwc3_omap_prepare,
-- 
1.7.2.5
N떑꿩�r툤y鉉싕b쾊Ф푤v�^�)頻{.n�+돴쪐{군펐왲^n뇊⊆쫧�곷h솳鈺�&��췍쳺�h�(��쉸듶줷"얎�m��곴�z받뻿筬f"톒쉱�~늤

Reply via email to