msm: clock-local: Don't skip handoff if mnd_en_mask is 0
Currently the code is handling the mn counter in use case, but
it fails to handle the mn counter not being used case. Fix the
conditional check so that clocks are handed off even if they're
not in mn counter mode.
Change-Id: I36eafd1f369ae7ebd2b44e383f7834350cb6e206
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock-local.c b/arch/arm/mach-msm/clock-local.c
index 2a1c013..050ec41 100644
--- a/arch/arm/mach-msm/clock-local.c
+++ b/arch/arm/mach-msm/clock-local.c
@@ -648,7 +648,7 @@
ns_val = readl_relaxed(clk->ns_reg) & ns_mask;
for (freq = clk->freq_tbl; freq->freq_hz != FREQ_END; freq++) {
if ((freq->ns_val & ns_mask) == ns_val &&
- (freq->mnd_en_mask || freq->md_val == md_val)) {
+ (!freq->mnd_en_mask || freq->md_val == md_val)) {
pr_info("%s rate=%d\n", clk->c.dbg_name, freq->freq_hz);
break;
}