aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs4270.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/cs4270.c')
-rw-r--r--sound/soc/codecs/cs4270.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 1d672f528662..047917f0b8ae 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -307,8 +307,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
307 struct snd_pcm_hw_params *params, 307 struct snd_pcm_hw_params *params,
308 struct snd_soc_dai *dai) 308 struct snd_soc_dai *dai)
309{ 309{
310 struct snd_soc_pcm_runtime *rtd = substream->private_data; 310 struct snd_soc_codec *codec = dai->codec;
311 struct snd_soc_codec *codec = rtd->codec;
312 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); 311 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
313 int ret; 312 int ret;
314 unsigned int i; 313 unsigned int i;
@@ -600,10 +599,12 @@ static int cs4270_soc_suspend(struct snd_soc_codec *codec)
600static int cs4270_soc_resume(struct snd_soc_codec *codec) 599static int cs4270_soc_resume(struct snd_soc_codec *codec)
601{ 600{
602 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); 601 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
603 int reg; 602 int reg, ret;
604 603
605 regulator_bulk_enable(ARRAY_SIZE(cs4270->supplies), 604 ret = regulator_bulk_enable(ARRAY_SIZE(cs4270->supplies),
606 cs4270->supplies); 605 cs4270->supplies);
606 if (ret != 0)
607 return ret;
607 608
608 /* In case the device was put to hard reset during sleep, we need to 609 /* In case the device was put to hard reset during sleep, we need to
609 * wait 500ns here before any I2C communication. */ 610 * wait 500ns here before any I2C communication. */