diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2020-07-23 02:05:17 +0300 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-07-23 02:09:08 +0300 |
commit | c4641a020b4d0888ff268dc3035db39b6df99b21 (patch) | |
tree | 9c4da7b2fa5034ac5ab34db4678a448e339d9ec2 /drivers | |
parent | ff348ceeaf6b41d45a868fd4c9078d87052c4143 (diff) |
Revert "clk: qcom: clk-debug: Reorder if statement to avoid self assignment"
* We'll take the upstream fix
This reverts commit 6a31f29c4f58e5c4797528e78c769ab00f9088ff.
Change-Id: I7abffb4eec8b1367c3fb67cab7ace5a40424491a
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/qcom/clk-debug.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/clk/qcom/clk-debug.c b/drivers/clk/qcom/clk-debug.c index ab390e6581f6..50d0d01188ed 100644 --- a/drivers/clk/qcom/clk-debug.c +++ b/drivers/clk/qcom/clk-debug.c @@ -177,10 +177,13 @@ static int clk_debug_mux_set_parent(struct clk_hw *hw, u8 index) regval |= (meas->parent[index].next_sel & meas->mask); - if (!meas->parent[index].en_mask) - regval |= meas->en_mask; - else if (meas->parent[index].en_mask != 0xFF) + if (meas->parent[index].en_mask == 0xFF) + /* Skip en_mask */ + regval = regval; + else if (meas->parent[index].en_mask) regval |= meas->parent[index].en_mask; + else + regval |= meas->en_mask; regmap_write(meas->regmap[dbg_cc], 0x0, regval); } |