summaryrefslogtreecommitdiff
path: root/sound/soc/samsung/s3c-i2s-v2.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2017-07-27 20:13:38 +0300
committerMark Brown <broonie@kernel.org>2017-07-28 12:58:31 +0300
commit6f187f7ef1c15dca9f720b18a7e928718fd1a8b3 (patch)
treeb7945f5dac6ea2100fa75f962ea86a378c665b00 /sound/soc/samsung/s3c-i2s-v2.c
parent81ea6cc73c384e4093519e0c75394aa2a1941a10 (diff)
downloadlinux-6f187f7ef1c15dca9f720b18a7e928718fd1a8b3.tar.xz
ASoC: samsung: Add proper error paths to s3c24xx I2S driver
s3c2412_i2s_probe() might fail so driver has to revert work done by s3c_i2sv2_probe() (clock enabling). Missing doing this would lead to clock enable in-balance. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/samsung/s3c-i2s-v2.c')
-rw-r--r--sound/soc/samsung/s3c-i2s-v2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
index 3894bda06ebb..58c3e9bfc6b7 100644
--- a/sound/soc/samsung/s3c-i2s-v2.c
+++ b/sound/soc/samsung/s3c-i2s-v2.c
@@ -651,6 +651,15 @@ int s3c_i2sv2_probe(struct snd_soc_dai *dai,
}
EXPORT_SYMBOL_GPL(s3c_i2sv2_probe);
+void s3c_i2sv2_cleanup(struct snd_soc_dai *dai,
+ struct s3c_i2sv2_info *i2s)
+{
+ clk_disable_unprepare(i2s->iis_pclk);
+ clk_put(i2s->iis_pclk);
+ i2s->iis_pclk = NULL;
+}
+EXPORT_SYMBOL_GPL(s3c_i2sv2_cleanup);
+
#ifdef CONFIG_PM
static int s3c2412_i2s_suspend(struct snd_soc_dai *dai)
{