Commit e09eea94 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Greg Kroah-Hartman

ASoC: rsnd: don't call free_irq() on Parent SSI

commit 1f8754d4 upstream.

If SSI uses shared pin, some SSI will be used as parent SSI.
Then, normal SSI's remove and Parent SSI's remove
(these are same SSI) will be called when unbind or remove timing.
In this case, free_irq() will be called twice.
This patch solve this issue.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: default avatarHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Reported-by: default avatarHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarthongsyho <thong.ho.px@rvc.renesas.com>
Signed-off-by: default avatarNhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 69fcbf02
...@@ -235,6 +235,7 @@ enum rsnd_mod_type { ...@@ -235,6 +235,7 @@ enum rsnd_mod_type {
RSND_MOD_MIX, RSND_MOD_MIX,
RSND_MOD_CTU, RSND_MOD_CTU,
RSND_MOD_SRC, RSND_MOD_SRC,
RSND_MOD_SSIP, /* SSI parent */
RSND_MOD_SSI, RSND_MOD_SSI,
RSND_MOD_MAX, RSND_MOD_MAX,
}; };
...@@ -365,6 +366,7 @@ struct rsnd_dai_stream { ...@@ -365,6 +366,7 @@ struct rsnd_dai_stream {
}; };
#define rsnd_io_to_mod(io, i) ((i) < RSND_MOD_MAX ? (io)->mod[(i)] : NULL) #define rsnd_io_to_mod(io, i) ((i) < RSND_MOD_MAX ? (io)->mod[(i)] : NULL)
#define rsnd_io_to_mod_ssi(io) rsnd_io_to_mod((io), RSND_MOD_SSI) #define rsnd_io_to_mod_ssi(io) rsnd_io_to_mod((io), RSND_MOD_SSI)
#define rsnd_io_to_mod_ssip(io) rsnd_io_to_mod((io), RSND_MOD_SSIP)
#define rsnd_io_to_mod_src(io) rsnd_io_to_mod((io), RSND_MOD_SRC) #define rsnd_io_to_mod_src(io) rsnd_io_to_mod((io), RSND_MOD_SRC)
#define rsnd_io_to_mod_ctu(io) rsnd_io_to_mod((io), RSND_MOD_CTU) #define rsnd_io_to_mod_ctu(io) rsnd_io_to_mod((io), RSND_MOD_CTU)
#define rsnd_io_to_mod_mix(io) rsnd_io_to_mod((io), RSND_MOD_MIX) #define rsnd_io_to_mod_mix(io) rsnd_io_to_mod((io), RSND_MOD_MIX)
......
...@@ -550,11 +550,16 @@ static int rsnd_ssi_dma_remove(struct rsnd_mod *mod, ...@@ -550,11 +550,16 @@ static int rsnd_ssi_dma_remove(struct rsnd_mod *mod,
struct rsnd_priv *priv) struct rsnd_priv *priv)
{ {
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io);
struct device *dev = rsnd_priv_to_dev(priv); struct device *dev = rsnd_priv_to_dev(priv);
int irq = ssi->info->irq; int irq = ssi->info->irq;
rsnd_dma_quit(io, rsnd_mod_to_dma(mod)); rsnd_dma_quit(io, rsnd_mod_to_dma(mod));
/* Do nothing for SSI parent mod */
if (ssi_parent_mod == mod)
return 0;
/* PIO will request IRQ again */ /* PIO will request IRQ again */
devm_free_irq(dev, irq, mod); devm_free_irq(dev, irq, mod);
......
Markdown is supported
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