thermal: core: Get thermal zone by id
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 6 Jul 2020 10:55:36 +0000 (12:55 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 7 Jul 2020 13:55:21 +0000 (15:55 +0200)
commit329b064fbd13d6526fdc35d4a220adedeadf0816
treec44eb04f650149b9be2cc91c31f06e749990c0c0
parent3d44a509c1dafb75adfe218f022ad216885c135e
thermal: core: Get thermal zone by id

The next patch will introduce the generic netlink protocol to handle
events, sampling and command from the thermal framework. In order to
deal with the thermal zone, it uses its unique identifier to
characterize it in the message. Passing an integer is more efficient
than passing an entire string.

This change provides a function returning back a thermal zone pointer
corresponding to the identifier passed as parameter.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20200706105538.2159-2-daniel.lezcano@linaro.org
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h