diff options
author | Paul Walmsley <paul@pwsan.com> | 2013-01-26 08:58:17 +0100 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2013-01-29 22:59:58 +0100 |
commit | 92493870196f52c743330db7b545b54b2abfda82 (patch) | |
tree | f4861c754544226fbba2f5756eb701a71ba82062 /arch/arm/mach-omap2/pm.c | |
parent | ARM: OMAP2+: clockdomain: work on wkdep/sleepdep functions (diff) | |
download | linux-92493870196f52c743330db7b545b54b2abfda82.tar.xz linux-92493870196f52c743330db7b545b54b2abfda82.zip |
ARM: OMAP2+: clockdomain: convert existing atomic usecounts into spinlock-protected shorts/ints
The atomic usecounts seem to be confusing, and are no longer needed
since the operations that they are attached to really should take
place under lock. Replace the atomic counters with simple integers,
protected by the enclosing powerdomain spinlock.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm.c')
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 48d6d5d2c926..88586d15004a 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -110,11 +110,12 @@ static void __init omap2_init_processor_devices(void) int __init omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused) { + /* XXX The usecount test is racy */ if ((clkdm->flags & CLKDM_CAN_ENABLE_AUTO) && !(clkdm->flags & CLKDM_MISSING_IDLE_REPORTING)) clkdm_allow_idle(clkdm); else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && - atomic_read(&clkdm->usecount) == 0) + clkdm->usecount == 0) clkdm_sleep(clkdm); return 0; } |