Skip to content

Commit 25be77e

Browse files
committed
thermal: core: Add thermal zone enable/disable notification
Now the calls to enable/disable a thermal zone are centralized in a call to a function, we can add in these the corresponding netlink notifications. Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Zhang Rui <[email protected]> Reviewed-by: Amit Kucheria <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 332bc8e commit 25be77e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/thermal/thermal_core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,11 @@ static int thermal_zone_device_set_mode(struct thermal_zone_device *tz,
509509

510510
thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
511511

512+
if (mode == THERMAL_DEVICE_ENABLED)
513+
thermal_notify_tz_enable(tz->id);
514+
else
515+
thermal_notify_tz_disable(tz->id);
516+
512517
return ret;
513518
}
514519

0 commit comments

Comments
 (0)