Skip to content

Commit 0f022aa

Browse files
committed
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
2 parents 1da5281 + 4ef3f2a commit 0f022aa

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

drivers/soundwire/qcom.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ struct qcom_swrm_ctrl {
169169
u8 wcmd_id;
170170
struct qcom_swrm_port_config pconfig[QCOM_SDW_MAX_PORTS];
171171
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];
173173
int (*reg_read)(struct qcom_swrm_ctrl *ctrl, int reg, u32 *val);
174174
int (*reg_write)(struct qcom_swrm_ctrl *ctrl, int reg, int val);
175175
u32 slave_status;
@@ -420,7 +420,7 @@ static int qcom_swrm_get_alert_slave_dev_num(struct qcom_swrm_ctrl *ctrl)
420420

421421
ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val);
422422

423-
for (dev_num = 0; dev_num < SDW_MAX_DEVICES; dev_num++) {
423+
for (dev_num = 0; dev_num <= SDW_MAX_DEVICES; dev_num++) {
424424
status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ));
425425

426426
if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) {
@@ -440,7 +440,7 @@ static void qcom_swrm_get_device_status(struct qcom_swrm_ctrl *ctrl)
440440
ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val);
441441
ctrl->slave_status = val;
442442

443-
for (i = 0; i < SDW_MAX_DEVICES; i++) {
443+
for (i = 0; i <= SDW_MAX_DEVICES; i++) {
444444
u32 s;
445445

446446
s = (val >> (i * 2));
@@ -1356,10 +1356,6 @@ static int qcom_swrm_probe(struct platform_device *pdev)
13561356
ctrl->bus.compute_params = &qcom_swrm_compute_params;
13571357
ctrl->bus.clk_stop_timeout = 300;
13581358

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-
13631359
ret = qcom_swrm_get_port_config(ctrl);
13641360
if (ret)
13651361
goto err_clk;

0 commit comments

Comments
 (0)