Skip to contentSkip to conversation

thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP

PATCH Applied Anson Huang 3 participants 3 messages Mar 2, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 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.

---
Changes since V2:
- drop the reviewed-by tag.

---
 drivers/thermal/imx_thermal.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/thermal/imx_thermal.c +2 -4
index bb6754a..e75dda5 100644
@@ -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);
Signature · 1 line
2.7.4
#2 lore raw
In reply to Anson Huang
Quoted 5 lines · Anson Huang

Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simplify the code.

---

Thanks applied

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog