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/cm3xxx.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/cm3xxx.c')
-rw-r--r-- | arch/arm/mach-omap2/cm3xxx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/cm3xxx.c b/arch/arm/mach-omap2/cm3xxx.c index b94af4cb9dd9..9061c307d915 100644 --- a/arch/arm/mach-omap2/cm3xxx.c +++ b/arch/arm/mach-omap2/cm3xxx.c @@ -186,7 +186,7 @@ static int omap3xxx_clkdm_clear_all_sleepdeps(struct clockdomain *clkdm) continue; /* only happens if data is erroneous */ mask |= 1 << cd->clkdm->dep_bit; - atomic_set(&cd->sleepdep_usecount, 0); + cd->sleepdep_usecount = 0; } omap2_cm_clear_mod_reg_bits(mask, clkdm->pwrdm.ptr->prcm_offs, OMAP3430_CM_SLEEPDEP); @@ -209,7 +209,7 @@ static int omap3xxx_clkdm_wakeup(struct clockdomain *clkdm) static void omap3xxx_clkdm_allow_idle(struct clockdomain *clkdm) { - if (atomic_read(&clkdm->usecount) > 0) + if (clkdm->usecount > 0) clkdm_add_autodeps(clkdm); omap3xxx_cm_clkdm_enable_hwsup(clkdm->pwrdm.ptr->prcm_offs, @@ -221,7 +221,7 @@ static void omap3xxx_clkdm_deny_idle(struct clockdomain *clkdm) omap3xxx_cm_clkdm_disable_hwsup(clkdm->pwrdm.ptr->prcm_offs, clkdm->clktrctrl_mask); - if (atomic_read(&clkdm->usecount) > 0) + if (clkdm->usecount > 0) clkdm_del_autodeps(clkdm); } |