]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal: core: Initialize thermal zones before registering them
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 4 Oct 2024 19:05:49 +0000 (21:05 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Oct 2024 10:06:06 +0000 (12:06 +0200)
commit662f920f7e390db5d1a6792a2b0ffa59b6c962fc
treef4afb5373db366c362c1a8b73626084c67c77371
parent85ee9449f76430846132b0248a99a6cfb524f992
thermal: core: Initialize thermal zones before registering them

Since user space can start interacting with a new thermal zone as soon
as device_register() called by thermal_zone_device_register_with_trips()
returns, it is better to initialize the thermal zone before calling
device_register() on it.

Fixes: d0df264fbd3c ("thermal/core: Remove pointless thermal_zone_device_reset() function")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3336146.44csPzL39Z@rjwysocki.net
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
drivers/thermal/thermal_core.c