Skip to content

Commit bb349fd

Browse files
Srinivas-Kandagatlavinodkoul
authored andcommitted
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>
1 parent fa55b7d commit bb349fd

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/soundwire/qcom.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,11 +1156,7 @@ static int qcom_swrm_get_port_config(struct qcom_swrm_ctrl *ctrl)
11561156
ret = of_property_read_u8_array(np, "qcom,ports-block-pack-mode",
11571157
bp_mode, nports);
11581158
if (ret) {
1159-
u32 version;
1160-
1161-
ctrl->reg_read(ctrl, SWRM_COMP_HW_VERSION, &version);
1162-
1163-
if (version <= 0x01030000)
1159+
if (ctrl->version <= 0x01030000)
11641160
memset(bp_mode, SWR_INVALID_PARAM, QCOM_SDW_MAX_PORTS);
11651161
else
11661162
return ret;

0 commit comments

Comments
 (0)