Skip to content

Commit ab39c88

Browse files
lukaszluba-armdlezcano
authored andcommitted
thermal/core/power allocator: Use the lockless __thermal_cdev_update() function
Use the new helper function and avoid unnecessery second lock/unlock, which was present in old approach with thermal_cdev_update(). Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210422153624.6074-4-lukasz.luba@arm.com
1 parent 1a93369 commit ab39c88

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/thermal/gov_power_allocator.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,8 @@ power_actor_set_power(struct thermal_cooling_device *cdev,
301301

302302
instance->target = clamp_val(state, instance->lower, instance->upper);
303303
mutex_lock(&cdev->lock);
304-
cdev->updated = false;
304+
__thermal_cdev_update(cdev);
305305
mutex_unlock(&cdev->lock);
306-
thermal_cdev_update(cdev);
307306

308307
return 0;
309308
}

0 commit comments

Comments
 (0)