OSDN Git Service

powercap/dtpm: Change locking scheme
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Sun, 30 Jan 2022 21:02:03 +0000 (22:02 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 23 Feb 2022 18:45:13 +0000 (19:45 +0100)
commit7b75bbdf5bedebed387aac6ad8411ed1cf3db5d0
tree1971fc02bccf8b14a48b85df14597b628434b5ff
parentb9d6c47a2be8d273ecc063afda6e9fd66a35116d
powercap/dtpm: Change locking scheme

The different functions are all called through the
dtpm_create_hierarchy() which handle the mutex. The different
functions are used in this context, consequently with the lock always
held.

Remove all locks taken in the function and add the lock in the
hierarchy creation function.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20220130210210.549877-1-daniel.lezcano@linaro.org
drivers/powercap/dtpm.c