diff mbox

[7/8] usb: dwc3: core: remove DWC3_PM_OPS

Message ID 1393530597-12259-7-git-send-email-balbi@ti.com
State New
Headers show

Commit Message

Felipe Balbi Feb. 27, 2014, 7:49 p.m. UTC
fix ifdefs around pm callbacks and remove
unnecessary DWC3_PM_OPS macro.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/dwc3/core.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index a49217a..eca1868 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -717,19 +717,17 @@  static int dwc3_resume(struct device *dev)
 
 	return 0;
 }
+#endif /* CONFIG_PM_SLEEP */
 
 static const struct dev_pm_ops dwc3_dev_pm_ops = {
+#ifdef CONFIG_PM_SLEEP
 	.prepare	= dwc3_prepare,
 	.complete	= dwc3_complete,
+#endif /* CONFIG_PM_SLEEP */
 
 	SET_SYSTEM_SLEEP_PM_OPS(dwc3_suspend, dwc3_resume)
 };
 
-#define DWC3_PM_OPS	&(dwc3_dev_pm_ops)
-#else
-#define DWC3_PM_OPS	NULL
-#endif
-
 #ifdef CONFIG_OF
 static const struct of_device_id of_dwc3_match[] = {
 	{
@@ -749,7 +747,7 @@  static struct platform_driver dwc3_driver = {
 	.driver		= {
 		.name	= "dwc3",
 		.of_match_table	= of_match_ptr(of_dwc3_match),
-		.pm	= DWC3_PM_OPS,
+		.pm	= &dwc3_dev_pm_ops,
 	},
 };