thermal: intel: int340x: Add locking to int340x_thermal_get_trip_type()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 25 Jan 2023 12:17:42 +0000 (13:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:27:28 +0000 (08:27 +0100)
commit4364bf79d8290c23d58db8a6a56d065ef3968cf0
treefd334c633a81b0aee34018dffb3937ab85277fc3
parente69c3a0d9d3dcacb3f89e3b5cda0fa0372717632
thermal: intel: int340x: Add locking to int340x_thermal_get_trip_type()

[ Upstream commit acd7e9ee57c880b99671dd99680cb707b7b5b0ee ]

In order to prevent int340x_thermal_get_trip_type() from possibly
racing with int340x_thermal_read_trips() invoked by int3403_notify()
add locking to it in analogy with int340x_thermal_get_trip_temp().

Fixes: 6757a7abe47b ("thermal: intel: int340x: Protect trip temperature from concurrent updates")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c