Skip to content

Commit 720f8db

Browse files
Uwe Kleine-Königdlezcano
authored andcommitted
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]
1 parent 62e79e3 commit 720f8db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/thermal/amlogic_thermal.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,11 @@ static int amlogic_thermal_enable(struct amlogic_thermal *data)
167167
return 0;
168168
}
169169

170-
static int amlogic_thermal_disable(struct amlogic_thermal *data)
170+
static void amlogic_thermal_disable(struct amlogic_thermal *data)
171171
{
172172
regmap_update_bits(data->regmap, TSENSOR_CFG_REG1,
173173
TSENSOR_CFG_REG1_ENABLE, 0);
174174
clk_disable_unprepare(data->clk);
175-
176-
return 0;
177175
}
178176

179177
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)
302300
{
303301
struct amlogic_thermal *data = dev_get_drvdata(dev);
304302

305-
return amlogic_thermal_disable(data);
303+
amlogic_thermal_disable(data);
304+
305+
return 0;
306306
}
307307

308308
static int __maybe_unused amlogic_thermal_resume(struct device *dev)

0 commit comments

Comments
 (0)