drm/xe/hwmon: Protect hwmon rw attributes with hwmon_lock
authorBadal Nilawar <badal.nilawar@intel.com>
Mon, 30 Oct 2023 11:56:17 +0000 (17:26 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:43:32 +0000 (11:43 -0500)
commitfef6dd12b45a1a15c24c9df30fb2c27e68984665
treeea194060bae1ccc890d9f4c6227dfa18cd9fbe81
parentb42ff0462d9eb7b84e31152c63c9809b6f743bf8
drm/xe/hwmon: Protect hwmon rw attributes with hwmon_lock

Take hwmon_lock while accessing hwmon rw attributes. For readonly
attributes its not required to take lock as reads are protected
by sysfs layer and therefore sequential.

Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231030115618.1382200-3-badal.nilawar@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_hwmon.c