aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2023-02-09 13:13:32 +0000
committerJohan Hovold <johan+linaro@kernel.org>2023-02-21 16:53:50 +0100
commit87fe94cb1fa1d49b82450f55abb52b0bb5527d74 (patch)
tree05b912321fec86069d7d96f504a1ba70767086ff
parent181dfb65d7f20e5822098f8a7cd41fddfcac9949 (diff)
soundwire: qcom: update status correctly with mask
SoundWire device status can be incorrectly updated without proper mask, fix this by adding a mask before updating the status. Fixes: c7d49c76d1d5 ("soundwire: qcom: add support to new interrupts") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230209131336.18252-2-srinivas.kandagatla@linaro.org Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
-rw-r--r--drivers/soundwire/qcom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 3354248702900..9d8ae77bad0af 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -434,7 +434,7 @@ static int qcom_swrm_get_alert_slave_dev_num(struct qcom_swrm_ctrl *ctrl)
status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ));
if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) {
- ctrl->status[dev_num] = status;
+ ctrl->status[dev_num] = status & SWRM_MCP_SLV_STATUS_MASK;
return dev_num;
}
}