blob: 828bd6348226c0b55e648b2ed561b3f444077600 [file] [log] [blame]
From bc1972c09bdc2bf1992bb1377c41d9ed745c8060 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Tue, 25 Oct 2016 00:36:34 +0000
Subject: [PATCH 067/299] ASoC: rsnd: don't use devm_request_irq() for SSI
SSI will use DMA mode, and migh be fallback to PIO mode.
Using devm_request_irq() makes its operation more complex when
it fallbacks to PIO mode.
Let's use manual request_irq()/free_irq()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 701172dca15ba9860ba73d3e18082fbd2a78f2c9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
sound/soc/sh/rcar/ssi.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -665,10 +665,14 @@ static int rsnd_ssi_common_probe(struct
if (ret < 0)
return ret;
- ret = devm_request_irq(dev, ssi->irq,
- rsnd_ssi_interrupt,
- IRQF_SHARED,
- dev_name(dev), mod);
+ /*
+ * SSI might be called again as PIO fallback
+ * It is easy to manual handling for IRQ request/free
+ */
+ ret = request_irq(ssi->irq,
+ rsnd_ssi_interrupt,
+ IRQF_SHARED,
+ dev_name(dev), mod);
return ret;
}
@@ -715,16 +719,13 @@ static int rsnd_ssi_dma_remove(struct rs
{
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
struct rsnd_mod *pure_ssi_mod = rsnd_io_to_mod_ssi(io);
- struct device *dev = rsnd_priv_to_dev(priv);
- int irq = ssi->irq;
/* Do nothing if non SSI (= SSI parent, multi SSI) mod */
if (pure_ssi_mod != mod)
return 0;
/* PIO will request IRQ again */
- if (ssi->dma)
- devm_free_irq(dev, irq, mod);
+ free_irq(ssi->irq, mod);
rsnd_dma_detach(mod, &ssi->dma);