@@ -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,
},
};
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(-)