diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-03-25 21:52:48 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-04-02 04:42:51 -0400 |
commit | 19fda7cd59eac8e537f63a4d9bd5973bf78a8c38 (patch) | |
tree | 3b0ff1a0fb296d64e22a4b9fe259848ba7309813 | |
parent | 538bf07d897008e87eca49cde5970545f3814ac7 (diff) |
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>
-rw-r--r-- | drivers/usb/dwc3/core.c | 2 | ||||
-rw-r--r-- | drivers/usb/dwc3/dwc3-exynos.c | 4 | ||||
-rw-r--r-- | drivers/usb/dwc3/dwc3-omap.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index e2325adf9c14..c35d49d39b76 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -634,7 +634,7 @@ static int dwc3_remove(struct platform_device *pdev) | |||
634 | return 0; | 634 | return 0; |
635 | } | 635 | } |
636 | 636 | ||
637 | #ifdef CONFIG_PM | 637 | #ifdef CONFIG_PM_SLEEP |
638 | static int dwc3_prepare(struct device *dev) | 638 | static int dwc3_prepare(struct device *dev) |
639 | { | 639 | { |
640 | struct dwc3 *dwc = dev_get_drvdata(dev); | 640 | struct dwc3 *dwc = dev_get_drvdata(dev); |
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index 1ea7bd8af6ae..a8afe6e26621 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c | |||
@@ -181,7 +181,7 @@ static const struct of_device_id exynos_dwc3_match[] = { | |||
181 | MODULE_DEVICE_TABLE(of, exynos_dwc3_match); | 181 | MODULE_DEVICE_TABLE(of, exynos_dwc3_match); |
182 | #endif | 182 | #endif |
183 | 183 | ||
184 | #ifdef CONFIG_PM | 184 | #ifdef CONFIG_PM_SLEEP |
185 | static int dwc3_exynos_suspend(struct device *dev) | 185 | static int dwc3_exynos_suspend(struct device *dev) |
186 | { | 186 | { |
187 | struct dwc3_exynos *exynos = dev_get_drvdata(dev); | 187 | struct dwc3_exynos *exynos = dev_get_drvdata(dev); |
@@ -212,7 +212,7 @@ static const struct dev_pm_ops dwc3_exynos_dev_pm_ops = { | |||
212 | #define DEV_PM_OPS (&dwc3_exynos_dev_pm_ops) | 212 | #define DEV_PM_OPS (&dwc3_exynos_dev_pm_ops) |
213 | #else | 213 | #else |
214 | #define DEV_PM_OPS NULL | 214 | #define DEV_PM_OPS NULL |
215 | #endif /* CONFIG_PM */ | 215 | #endif /* CONFIG_PM_SLEEP */ |
216 | 216 | ||
217 | static struct platform_driver dwc3_exynos_driver = { | 217 | static struct platform_driver dwc3_exynos_driver = { |
218 | .probe = dwc3_exynos_probe, | 218 | .probe = dwc3_exynos_probe, |
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 6de734f494bd..34638b92500d 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c | |||
@@ -410,7 +410,7 @@ static const struct of_device_id of_dwc3_match[] = { | |||
410 | }; | 410 | }; |
411 | MODULE_DEVICE_TABLE(of, of_dwc3_match); | 411 | MODULE_DEVICE_TABLE(of, of_dwc3_match); |
412 | 412 | ||
413 | #ifdef CONFIG_PM | 413 | #ifdef CONFIG_PM_SLEEP |
414 | static int dwc3_omap_prepare(struct device *dev) | 414 | static int dwc3_omap_prepare(struct device *dev) |
415 | { | 415 | { |
416 | struct dwc3_omap *omap = dev_get_drvdata(dev); | 416 | struct dwc3_omap *omap = dev_get_drvdata(dev); |
@@ -461,7 +461,7 @@ static const struct dev_pm_ops dwc3_omap_dev_pm_ops = { | |||
461 | #define DEV_PM_OPS (&dwc3_omap_dev_pm_ops) | 461 | #define DEV_PM_OPS (&dwc3_omap_dev_pm_ops) |
462 | #else | 462 | #else |
463 | #define DEV_PM_OPS NULL | 463 | #define DEV_PM_OPS NULL |
464 | #endif /* CONFIG_PM */ | 464 | #endif /* CONFIG_PM_SLEEP */ |
465 | 465 | ||
466 | static struct platform_driver dwc3_omap_driver = { | 466 | static struct platform_driver dwc3_omap_driver = { |
467 | .probe = dwc3_omap_probe, | 467 | .probe = dwc3_omap_probe, |