Skip to content
Commit 29aa37cd authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown
Browse files

ASoC: sgtl5000: Fix the cache handling

Since commit e5d80e82

 (ASoC: sgtl5000: Convert to use regmap directly) a
kernel oops is observed after a suspend/resume sequence.

The kernel oops happens inside sgtl5000_restore_regs() as codec->reg_cache is no
longer a valid pointer.

Add the remaining register entries into sgtl5000_reg_defaults[] and remove
sgtl5000_restore_regs() completely, which allows suspend/resume to work fine and
make the code simpler.

Tested on a im53-qsb board.

Reported-by: default avatarShawn Guo <shawn.guo@freescale.com>
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Tested-by: default avatarShawn Guo <shawn.guo@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 63e54cd9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment