thermal: core: Add thermal zone enable/disable notification
PATCH 1/1 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]>
--- drivers/thermal/thermal_core.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/thermal/thermal_core.c +5 -0
@@ -509,6 +509,11 @@ static int thermal_zone_device_set_mode(struct thermal_zone_device *tz,thermal_zone_device_update (tz,THERMAL_EVENT_UNSPECIFIED ); +if (mode ==THERMAL_DEVICE_ENABLED ) +thermal_notify_tz_enable (tz->id); +else +thermal_notify_tz_disable (tz->id); +return ret; }
Signature · 1 line
2.17.1
Quoted 5 lines · Daniel Lezcano
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]>
Quoted 22 lines
--- drivers/thermal/thermal_core.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/thermal/thermal_core.c +5
-0@@ -509,6 +509,11 @@ static int thermal_zone_device_set_mode(structthermal_zone_device *tz,thermal_zone_device_update (tz ,THERMAL_EVENT_UNSPECIFIED ); +if (mode ==THERMAL_DEVICE_ENABLED ) +thermal_notify_tz_enable (tz->id); +else +thermal_notify_tz_disable (tz->id); +return ret; }
Quoted 6 lines · Daniel Lezcano
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]>
Reviewed-by Amit Kucheria <[email protected]>
Quoted 23 lines
--- drivers/thermal/thermal_core.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/thermal/thermal_core.c +5
-1@@ -509,6 +509,11 @@ static int thermal_zone_device_set_mode(struct thermal_zone_device *tz,thermal_zone_device_update (tz,THERMAL_EVENT_UNSPECIFIED ); +if (mode ==THERMAL_DEVICE_ENABLED ) +thermal_notify_tz_enable (tz->id); +else +thermal_notify_tz_disable (tz->id); +return ret; } --2.17.1
Daniel Lezcano
AppliedQuoted 10 lines · Amit Kucheria
Quoted 6 lines · Daniel Lezcano
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]>Reviewed-by Amit Kucheria <[email protected]>
I've applied the changes, thanks for the review.
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