Commit 9f644a64 authored by Marcus Folkesson's avatar Marcus Folkesson Committed by Peter Chen

usb: chipidea: imx: do not use preprocessor conditionals for PM

Use preprocessor conditionals for CONFIG_PM and CONFIG_PM_SLEEP is
not necessary since SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS does
that internally.

It is also the preferred way according to our coding style guidelines.
Signed-off-by: default avatarMarcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
parent 1652a83f
...@@ -364,8 +364,7 @@ static void ci_hdrc_imx_shutdown(struct platform_device *pdev) ...@@ -364,8 +364,7 @@ static void ci_hdrc_imx_shutdown(struct platform_device *pdev)
ci_hdrc_imx_remove(pdev); ci_hdrc_imx_remove(pdev);
} }
#ifdef CONFIG_PM static int __maybe_unused imx_controller_suspend(struct device *dev)
static int imx_controller_suspend(struct device *dev)
{ {
struct ci_hdrc_imx_data *data = dev_get_drvdata(dev); struct ci_hdrc_imx_data *data = dev_get_drvdata(dev);
...@@ -377,7 +376,7 @@ static int imx_controller_suspend(struct device *dev) ...@@ -377,7 +376,7 @@ static int imx_controller_suspend(struct device *dev)
return 0; return 0;
} }
static int imx_controller_resume(struct device *dev) static int __maybe_unused imx_controller_resume(struct device *dev)
{ {
struct ci_hdrc_imx_data *data = dev_get_drvdata(dev); struct ci_hdrc_imx_data *data = dev_get_drvdata(dev);
int ret = 0; int ret = 0;
...@@ -408,8 +407,7 @@ static int imx_controller_resume(struct device *dev) ...@@ -408,8 +407,7 @@ static int imx_controller_resume(struct device *dev)
return ret; return ret;
} }
#ifdef CONFIG_PM_SLEEP static int __maybe_unused ci_hdrc_imx_suspend(struct device *dev)
static int ci_hdrc_imx_suspend(struct device *dev)
{ {
int ret; int ret;
...@@ -431,7 +429,7 @@ static int ci_hdrc_imx_suspend(struct device *dev) ...@@ -431,7 +429,7 @@ static int ci_hdrc_imx_suspend(struct device *dev)
return imx_controller_suspend(dev); return imx_controller_suspend(dev);
} }
static int ci_hdrc_imx_resume(struct device *dev) static int __maybe_unused ci_hdrc_imx_resume(struct device *dev)
{ {
struct ci_hdrc_imx_data *data = dev_get_drvdata(dev); struct ci_hdrc_imx_data *data = dev_get_drvdata(dev);
int ret; int ret;
...@@ -445,9 +443,8 @@ static int ci_hdrc_imx_resume(struct device *dev) ...@@ -445,9 +443,8 @@ static int ci_hdrc_imx_resume(struct device *dev)
return ret; return ret;
} }
#endif /* CONFIG_PM_SLEEP */
static int ci_hdrc_imx_runtime_suspend(struct device *dev) static int __maybe_unused ci_hdrc_imx_runtime_suspend(struct device *dev)
{ {
struct ci_hdrc_imx_data *data = dev_get_drvdata(dev); struct ci_hdrc_imx_data *data = dev_get_drvdata(dev);
int ret; int ret;
...@@ -466,13 +463,11 @@ static int ci_hdrc_imx_runtime_suspend(struct device *dev) ...@@ -466,13 +463,11 @@ static int ci_hdrc_imx_runtime_suspend(struct device *dev)
return imx_controller_suspend(dev); return imx_controller_suspend(dev);
} }
static int ci_hdrc_imx_runtime_resume(struct device *dev) static int __maybe_unused ci_hdrc_imx_runtime_resume(struct device *dev)
{ {
return imx_controller_resume(dev); return imx_controller_resume(dev);
} }
#endif /* CONFIG_PM */
static const struct dev_pm_ops ci_hdrc_imx_pm_ops = { static const struct dev_pm_ops ci_hdrc_imx_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(ci_hdrc_imx_suspend, ci_hdrc_imx_resume) SET_SYSTEM_SLEEP_PM_OPS(ci_hdrc_imx_suspend, ci_hdrc_imx_resume)
SET_RUNTIME_PM_OPS(ci_hdrc_imx_runtime_suspend, SET_RUNTIME_PM_OPS(ci_hdrc_imx_runtime_suspend,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment