drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write
authorAshutosh Dixit <ashutosh.dixit@intel.com>
Thu, 20 Apr 2023 16:40:39 +0000 (09:40 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 26 Apr 2023 22:02:33 +0000 (18:02 -0400)
commitd81268ee1c1073471cf0e8adb0fc9d026b602c3b
tree5068fd59c541c1348cf40e8a636e0204b4075623
parent80ab31799002166ac7c660bacfbff4f85bc29107
drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write

In preparation for follow-on patches, refactor hwm_power_max_write to take
hwmon_lock and runtime pm wakeref at start of the function and release them
at the end, therefore acquiring these just once each.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230420164041.1428455-2-ashutosh.dixit@intel.com
drivers/gpu/drm/i915/i915_hwmon.c