Skip to content

Commit 07687cd

Browse files
rfvirgilbroonie
authored andcommitted
ASoC: cs35l56: Don't add the same register patch multiple times
Move the call to cs35l56_set_patch() earlier in cs35l56_init() so that it only adds the register patch on first-time initialization. The call was after the post_soft_reset label, so every time this function was run to re-initialize the hardware after a reset it would call regmap_register_patch() and add the same reg_sequence again. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: 898673b ("ASoC: cs35l56: Move shared data into a common data structure") Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent cd38ccb commit 07687cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/soc/codecs/cs35l56.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,10 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
11591159
if (ret < 0)
11601160
return ret;
11611161

1162+
ret = cs35l56_set_patch(&cs35l56->base);
1163+
if (ret)
1164+
return ret;
1165+
11621166
/* Populate the DSP information with the revision and security state */
11631167
cs35l56->dsp.part = devm_kasprintf(cs35l56->base.dev, GFP_KERNEL, "cs35l56%s-%02x",
11641168
cs35l56->base.secured ? "s" : "", cs35l56->base.rev);
@@ -1197,10 +1201,6 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
11971201
if (ret)
11981202
return ret;
11991203

1200-
ret = cs35l56_set_patch(&cs35l56->base);
1201-
if (ret)
1202-
return ret;
1203-
12041204
/* Registers could be dirty after soft reset or SoundWire enumeration */
12051205
regcache_sync(cs35l56->base.regmap);
12061206

0 commit comments

Comments
 (0)