From 132495eca68055477c61edc9a98bdbe526baa004 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Wed, 27 Feb 2019 11:47:39 +0100 Subject: LOCAL: ASoC: temporary workaround for i2s/prepare_lock deadlock This reverts commit 00ffa8a3b1a60a89ab0ef5ae1d8e41269c30a3bd. Change-Id: I396b1250a748fdb8219abf6d0bf71c5fab119658 Signed-off-by: Marek Szyprowski --- sound/soc/samsung/i2s.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 4231001226f4..d3d250ea4f6b 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -618,11 +618,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int rfs, writel(mod, priv->addr + I2SMOD); spin_unlock_irqrestore(&priv->lock, flags); done: - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); return 0; err: - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); return ret; } @@ -706,7 +706,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) if (any_active(i2s) && ((mod & (sdf_mask | lrp_rlow | mod_slave)) != tmp)) { spin_unlock_irqrestore(&priv->lock, flags); - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); dev_err(&i2s->pdev->dev, "%s:%d Other DAI busy\n", __func__, __LINE__); return -EAGAIN; @@ -716,7 +716,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) mod |= tmp; writel(mod, priv->addr + I2SMOD); spin_unlock_irqrestore(&priv->lock, flags); - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); return 0; } @@ -867,7 +867,7 @@ static void i2s_shutdown(struct snd_pcm_substream *substream, spin_unlock_irqrestore(&priv->pcm_lock, flags); - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); } static int config_setup(struct i2s_dai *i2s) @@ -973,7 +973,7 @@ static int i2s_trigger(struct snd_pcm_substream *substream, } spin_unlock_irqrestore(&priv->lock, flags); - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); break; } @@ -991,13 +991,13 @@ static int i2s_set_clkdiv(struct snd_soc_dai *dai, pm_runtime_get_sync(dai->dev); if ((any_active(i2s) && div && (get_bfs(i2s) != div)) || (other && other->bfs && (other->bfs != div))) { - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); dev_err(&i2s->pdev->dev, "%s:%d Other DAI busy\n", __func__, __LINE__); return -EAGAIN; } i2s->bfs = div; - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); break; default: dev_err(&i2s->pdev->dev, @@ -1083,7 +1083,7 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) if (!is_opened(other)) i2s_set_sysclk(dai, SAMSUNG_I2S_CDCLK, 0, SND_SOC_CLOCK_IN); - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); return 0; } @@ -1104,7 +1104,7 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai) } } - pm_runtime_put(dai->dev); + pm_runtime_put_sync(dai->dev); return 0; } -- cgit v1.2.3