projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c404c64
)
powercap/dtpm: Move the 'root' reset place
author
Daniel Lezcano
<daniel.lezcano@linaro.org>
Sun, 30 Jan 2022 21:02:07 +0000
(22:02 +0100)
committer
Daniel Lezcano
<daniel.lezcano@linaro.org>
Wed, 23 Feb 2022 18:45:45 +0000
(19:45 +0100)
The 'root' node is checked everytime a dtpm node is destroyed.
When we reach the end of the hierarchy destruction function, we can
unconditionnaly set the 'root' node to NULL again.
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-5-daniel.lezcano@linaro.org
drivers/powercap/dtpm.c
patch
|
blob
|
history
diff --git
a/drivers/powercap/dtpm.c
b/drivers/powercap/dtpm.c
index d9d74f981118636f6d453e362b8d1283d11cb56d..ec931a06d90aee04966713242b420f734a24f50f 100644
(file)
--- a/
drivers/powercap/dtpm.c
+++ b/
drivers/powercap/dtpm.c
@@
-184,9
+184,6
@@
int dtpm_release_zone(struct powercap_zone *pcz)
else
kfree(dtpm);
- if (root == dtpm)
- root = NULL;
-
return 0;
}
@@
-656,6
+653,8
@@
void dtpm_destroy_hierarchy(void)
pct = NULL;
+ root = NULL;
+
out_unlock:
mutex_unlock(&dtpm_lock);
}