Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'soundwire-6.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-linus

Vinod writes:
"soundwire fixes for v6.0

This contains two fixes to qcom sdw driver which resolve duplicate reset
control get and second one fixes device array indices."

* tag 'soundwire-6.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
soundwire: qcom: fix device status array range
soundwire: qcom: remove duplicate reset control get

+3 -7
+3 -7
drivers/soundwire/qcom.c
··· 169 169 u8 wcmd_id; 170 170 struct qcom_swrm_port_config pconfig[QCOM_SDW_MAX_PORTS]; 171 171 struct sdw_stream_runtime *sruntime[SWRM_MAX_DAIS]; 172 - enum sdw_slave_status status[SDW_MAX_DEVICES]; 172 + enum sdw_slave_status status[SDW_MAX_DEVICES + 1]; 173 173 int (*reg_read)(struct qcom_swrm_ctrl *ctrl, int reg, u32 *val); 174 174 int (*reg_write)(struct qcom_swrm_ctrl *ctrl, int reg, int val); 175 175 u32 slave_status; ··· 420 420 421 421 ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val); 422 422 423 - for (dev_num = 0; dev_num < SDW_MAX_DEVICES; dev_num++) { 423 + for (dev_num = 0; dev_num <= SDW_MAX_DEVICES; dev_num++) { 424 424 status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ)); 425 425 426 426 if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) { ··· 440 440 ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val); 441 441 ctrl->slave_status = val; 442 442 443 - for (i = 0; i < SDW_MAX_DEVICES; i++) { 443 + for (i = 0; i <= SDW_MAX_DEVICES; i++) { 444 444 u32 s; 445 445 446 446 s = (val >> (i * 2)); ··· 1355 1355 ctrl->bus.port_ops = &qcom_swrm_port_ops; 1356 1356 ctrl->bus.compute_params = &qcom_swrm_compute_params; 1357 1357 ctrl->bus.clk_stop_timeout = 300; 1358 - 1359 - ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr"); 1360 - if (IS_ERR(ctrl->audio_cgcr)) 1361 - dev_err(dev, "Failed to get audio_cgcr reset required for soundwire-v1.6.0\n"); 1362 1358 1363 1359 ret = qcom_swrm_get_port_config(ctrl); 1364 1360 if (ret)