diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2023-02-09 13:13:32 +0000 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2023-04-20 13:36:39 +0200 |
commit | a887e4a2104fcd2163c661df41f37edb0accfef0 (patch) | |
tree | e67d5503e90429f94c2e40a9022a3a650f06cfd0 | |
parent | 5af22bbbbf1decba08f061e31f94224a8fbdd96c (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>
(cherry picked from commit 87fe94cb1fa1d49b82450f55abb52b0bb5527d74)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-rw-r--r-- | drivers/soundwire/qcom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 802d939ce7aa..700adc8e2a34 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -514,7 +514,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; } } |