aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <[email protected]>2023-11-16 12:26:35 +0100
committerDaniel Lezcano <[email protected]>2024-01-02 09:33:18 +0100
commit720f8db834a31009d8d11893278ca3f8072a575e (patch)
tree8b35851af5f90f1708884a43c57839d691302d96
parent62e79e38b257a59f1e3d8aff801ae8590e2e45b4 (diff)
thermal: amlogic: Make amlogic_thermal_disable() return void
amlogic_thermal_disable() returned zero unconditionally and amlogic_thermal_remove() already ignores the return value. Make it return no value and modify amlogic_thermal_suspend to not check the value. This patch introduces no semantic changes, but makes it more obvious for a human reader that amlogic_thermal_suspend() cannot fail. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--drivers/thermal/amlogic_thermal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 5877cde25b79..562f63b7bf27 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -167,13 +167,11 @@ static int amlogic_thermal_enable(struct amlogic_thermal *data)
return 0;
}
-static int amlogic_thermal_disable(struct amlogic_thermal *data)
+static void amlogic_thermal_disable(struct amlogic_thermal *data)
{
regmap_update_bits(data->regmap, TSENSOR_CFG_REG1,
TSENSOR_CFG_REG1_ENABLE, 0);
clk_disable_unprepare(data->clk);
-
- return 0;
}
static int amlogic_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
@@ -302,7 +300,9 @@ static int __maybe_unused amlogic_thermal_suspend(struct device *dev)
{
struct amlogic_thermal *data = dev_get_drvdata(dev);
- return amlogic_thermal_disable(data);
+ amlogic_thermal_disable(data);
+
+ return 0;
}
static int __maybe_unused amlogic_thermal_resume(struct device *dev)