soundwire: qcom: clear BIT FIELDs before value set.
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thu, 17 Sep 2020 12:01:36 +0000 (13:01 +0100)
committerVinod Koul <vkoul@kernel.org>
Fri, 18 Sep 2020 12:18:51 +0000 (17:48 +0530)
commit578ddced239f554baf6ba935a53077f6a80cb584
tree360ceda7fc1530ec4f4d594a5c9e6a589c2864a4
parent9026118f20e28f202dab34f219bbb831ffb8c4dc
soundwire: qcom: clear BIT FIELDs before value set.

According to usage (bitfields.h) of REG_FIELDS,
Modify is:
  reg &= ~REG_FIELD_C;
  reg |= FIELD_PREP(REG_FIELD_C, c);

Patch ("soundwire: qcom : use FIELD_{GET|PREP}") seems to have
accidentally removed clearing bit field while modifying the register.

Fix this by using u32p_replace_bits() to clear and set the values.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200917120138.11313-2-srinivas.kandagatla@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/qcom.c