summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/qcom.c
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2021-11-16 11:50:17 +0100
committerVinod Koul <vkoul@kernel.org>2021-11-23 12:17:37 +0100
commitbb349fd2d58062c69508414a9080d822b8d096b5 (patch)
tree3e0514735d96e92924587a55a7ca9ee50144e1bd /drivers/soundwire/qcom.c
parentLinux 5.16-rc1 (diff)
downloadlinux-bb349fd2d58062c69508414a9080d822b8d096b5.tar.xz
linux-bb349fd2d58062c69508414a9080d822b8d096b5.zip
soundwire: qcom: remove redundant version number read
Controller version is already available in struct qcom_swrm_ctrl, Just make use of it instead of reading this again. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116105017.12010-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/qcom.c')
-rw-r--r--drivers/soundwire/qcom.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index a317bea2d42d..46995bb382eb 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1156,11 +1156,7 @@ static int qcom_swrm_get_port_config(struct qcom_swrm_ctrl *ctrl)
ret = of_property_read_u8_array(np, "qcom,ports-block-pack-mode",
bp_mode, nports);
if (ret) {
- u32 version;
-
- ctrl->reg_read(ctrl, SWRM_COMP_HW_VERSION, &version);
-
- if (version <= 0x01030000)
+ if (ctrl->version <= 0x01030000)
memset(bp_mode, SWR_INVALID_PARAM, QCOM_SDW_MAX_PORTS);
else
return ret;