thermal/core: Add a thermal zone 'devdata' accessor
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 1 Mar 2023 20:14:29 +0000 (21:14 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 3 Mar 2023 19:45:02 +0000 (20:45 +0100)
commita6ff3c0021468721b96e84892a8cae24bde8d65f
tree2a640cca042cde3397833dab19851688f2d90b7c
parent0a3f9a6b0265b64c02226fcabb5e9a958307913b
thermal/core: Add a thermal zone 'devdata' accessor

The thermal zone device structure is exposed to the different drivers
and obviously they access the internals while that should be
restricted to the core thermal code.

In order to self-encapsulate the thermal core code, we need to prevent
the drivers accessing directly the thermal zone structure and provide
accessor functions to deal with.

Provide an accessor to the 'devdata' structure and make use of it in
the different drivers.

No functional changes intended.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_core.c
include/linux/thermal.h