thermal/core: Protect hwmon accesses to thermal operations with thermal zone mutex
authorGuenter Roeck <linux@roeck-us.net>
Thu, 10 Nov 2022 15:24:57 +0000 (07:24 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 14 Nov 2022 18:04:37 +0000 (19:04 +0100)
commitea37bec51ff442546e4a57d5cca2de9cc64a9df3
treeaf7d91ef27f6ddbf639148f7d50d680d78a40cc1
parent1c439dec359caa225c7752334c7a14ef9e3344c7
thermal/core: Protect hwmon accesses to thermal operations with thermal zone mutex

In preparation to protecting access to thermal operations against thermal
zone device removal, protect hwmon accesses to thermal zone operations
with the thermal zone mutex. After acquiring the mutex, ensure that the
thermal zone device is registered before proceeding.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_hwmon.c