On Tue, Feb 21, 2023 at 7:07 PM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
Some drivers are directly using the thermal zone's 'device' structure
field.
Use the driver device pointer instead of the thermal zone device when
it is available.
Remove the traces when they are duplicate with the traces in the core
code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
Reviewed-by: Balsam CHIHI <bchihi@xxxxxxxxxxxx> #Mediatek LVTS
---
thermal_zone_device_update(data->ti_thermal, THERMAL_EVENT_UNSPECIFIED);
- dev_dbg(&data->ti_thermal->device, "updated thermal zone %s\n",
+ dev_dbg(data->bgp->dev, "updated thermal zone %s\n",
data->ti_thermal->type);
The code before the change is more consistent, because it refers to
the same object in both instances.
It looks like a type field accessor is needed, eg. thermal_zone_device_type()?
Or move the debug message to thermal_zone_device_update()?