Commit b009514f authored by Anson Huang's avatar Anson Huang Committed by Daniel Lezcano

thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP

Use __maybe_unused for power management related functions instead
of #if CONFIG_PM_SLEEP to simplify the code.
Signed-off-by: default avatarAnson Huang <Anson.Huang@nxp.com>
Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/1583139266-23615-1-git-send-email-Anson.Huang@nxp.com
parent 1fd213f3
......@@ -878,8 +878,7 @@ static int imx_thermal_remove(struct platform_device *pdev)
return 0;
}
#ifdef CONFIG_PM_SLEEP
static int imx_thermal_suspend(struct device *dev)
static int __maybe_unused imx_thermal_suspend(struct device *dev)
{
struct imx_thermal_data *data = dev_get_drvdata(dev);
struct regmap *map = data->tempmon;
......@@ -900,7 +899,7 @@ static int imx_thermal_suspend(struct device *dev)
return 0;
}
static int imx_thermal_resume(struct device *dev)
static int __maybe_unused imx_thermal_resume(struct device *dev)
{
struct imx_thermal_data *data = dev_get_drvdata(dev);
struct regmap *map = data->tempmon;
......@@ -918,7 +917,6 @@ static int imx_thermal_resume(struct device *dev)
return 0;
}
#endif
static SIMPLE_DEV_PM_OPS(imx_thermal_pm_ops,
imx_thermal_suspend, imx_thermal_resume);
......
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