diff options
author | Rajendra Nayak <rnayak@ti.com> | 2011-06-28 18:22:04 -0700 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2011-06-29 13:30:55 -0700 |
commit | be29c5504d786051c4aa9ff05ddeba2e853b500d (patch) | |
tree | ccb1f70ff74ff1fdaa9749dffc3ca63bfdb84610 /arch/arm | |
parent | d60565948468b9ed9ea2eddbbfff8381225e526b (diff) | |
download | kernel_samsung_tuna-be29c5504d786051c4aa9ff05ddeba2e853b500d.zip kernel_samsung_tuna-be29c5504d786051c4aa9ff05ddeba2e853b500d.tar.gz kernel_samsung_tuna-be29c5504d786051c4aa9ff05ddeba2e853b500d.tar.bz2 |
OMAP: powerdomain: lock spinlock around plist_add/plist_del
The spinlock to guard wakeuplat_dev_list is defined but unused. Not
locking it for plist_add and plist_del operations causes WARN;s
with CONFIG_DEBUG_PI_LIST=y.
Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 71d9b75..56aee28 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -1089,7 +1089,9 @@ int pwrdm_wakeuplat_set_constraint (struct powerdomain *pwrdm, } plist_node_init(&user->node, t); + spin_lock(&pwrdm->wakeuplat_lock); plist_add(&user->node, &pwrdm->wakeuplat_dev_list); + spin_unlock(&pwrdm->wakeuplat_lock); user->node.prio = user->constraint_us = t; ret = pwrdm_wakeuplat_update_pwrst(pwrdm); @@ -1136,7 +1138,9 @@ int pwrdm_wakeuplat_release_constraint (struct powerdomain *pwrdm, goto exit_rls; } + spin_lock(&pwrdm->wakeuplat_lock); plist_del(&user->node, &pwrdm->wakeuplat_dev_list); + spin_unlock(&pwrdm->wakeuplat_lock); kfree(user); ret = pwrdm_wakeuplat_update_pwrst(pwrdm); |