aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2023-10-25 20:22:23 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-11-28 16:02:14 +0100
commit30e1178c100df8c8560f4d338fdb6f4fcd27e676 (patch)
tree8cb50794cf104ed5fb5a7461b2ef3dc9889a205c /drivers/thermal
parent499cc391b41c8ccf5f5eae4c85e1725a037f138f (diff)
downloadlinux-30e1178c100df8c8560f4d338fdb6f4fcd27e676.tar.gz
thermal: gov_power_allocator: Use shorter paths to access data when possible
The 'cdev' pointer in allow_maximum_power() is valid, so there is no need to use 'instance->cdev' instead of it. This change is not expected to alter the general functionality. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/gov_power_allocator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
index 79621b42ead38..0f7f8278eacc5 100644
--- a/drivers/thermal/gov_power_allocator.c
+++ b/drivers/thermal/gov_power_allocator.c
@@ -560,7 +560,7 @@ static void allow_maximum_power(struct thermal_zone_device *tz, bool update)
continue;
instance->target = 0;
- mutex_lock(&instance->cdev->lock);
+ mutex_lock(&cdev->lock);
/*
* Call for updating the cooling devices local stats and avoid
* periods of dozen of seconds when those have not been
@@ -569,9 +569,9 @@ static void allow_maximum_power(struct thermal_zone_device *tz, bool update)
cdev->ops->get_requested_power(cdev, &req_power);
if (update)
- __thermal_cdev_update(instance->cdev);
+ __thermal_cdev_update(cdev);
- mutex_unlock(&instance->cdev->lock);
+ mutex_unlock(&cdev->lock);
}
}