aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2016-04-15 08:11:56 -0400
committerMark Brown <broonie@kernel.org>2016-04-15 13:01:02 -0400
commit54dca7015a7d6c09d34623c6ec61de30896186dd (patch)
treeb729c587dc798247b6305bfa6ff558277f5d3f59
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
ASoC: arizona: Free speaker thermal IRQs in CODEC remove
The thermal warning IRQs for the speaker are requested in CODEC probe but never freed. This patch frees them in CODEC remove. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/arizona.c12
-rw-r--r--sound/soc/codecs/arizona.h2
-rw-r--r--sound/soc/codecs/cs47l24.c3
-rw-r--r--sound/soc/codecs/wm5102.c2
-rw-r--r--sound/soc/codecs/wm5110.c2
-rw-r--r--sound/soc/codecs/wm8997.c2
-rw-r--r--sound/soc/codecs/wm8998.c2
7 files changed, 25 insertions, 0 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 92d22a018d68..83959312f7a0 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -249,6 +249,18 @@ int arizona_init_spk(struct snd_soc_codec *codec)
249} 249}
250EXPORT_SYMBOL_GPL(arizona_init_spk); 250EXPORT_SYMBOL_GPL(arizona_init_spk);
251 251
252int arizona_free_spk(struct snd_soc_codec *codec)
253{
254 struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
255 struct arizona *arizona = priv->arizona;
256
257 arizona_free_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT_WARN, arizona);
258 arizona_free_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT, arizona);
259
260 return 0;
261}
262EXPORT_SYMBOL_GPL(arizona_free_spk);
263
252static const struct snd_soc_dapm_route arizona_mono_routes[] = { 264static const struct snd_soc_dapm_route arizona_mono_routes[] = {
253 { "OUT1R", NULL, "OUT1L" }, 265 { "OUT1R", NULL, "OUT1L" },
254 { "OUT2R", NULL, "OUT2L" }, 266 { "OUT2R", NULL, "OUT2L" },
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h
index 1ea8e4ecf8d4..ce0531b8c632 100644
--- a/sound/soc/codecs/arizona.h
+++ b/sound/soc/codecs/arizona.h
@@ -307,6 +307,8 @@ extern int arizona_init_spk(struct snd_soc_codec *codec);
307extern int arizona_init_gpio(struct snd_soc_codec *codec); 307extern int arizona_init_gpio(struct snd_soc_codec *codec);
308extern int arizona_init_mono(struct snd_soc_codec *codec); 308extern int arizona_init_mono(struct snd_soc_codec *codec);
309 309
310extern int arizona_free_spk(struct snd_soc_codec *codec);
311
310extern int arizona_init_dai(struct arizona_priv *priv, int dai); 312extern int arizona_init_dai(struct arizona_priv *priv, int dai);
311 313
312int arizona_set_output_mode(struct snd_soc_codec *codec, int output, 314int arizona_set_output_mode(struct snd_soc_codec *codec, int output,
diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c
index 576087bda330..00e9b6fc1b5c 100644
--- a/sound/soc/codecs/cs47l24.c
+++ b/sound/soc/codecs/cs47l24.c
@@ -1108,6 +1108,9 @@ static int cs47l24_codec_remove(struct snd_soc_codec *codec)
1108 priv->core.arizona->dapm = NULL; 1108 priv->core.arizona->dapm = NULL;
1109 1109
1110 arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv); 1110 arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
1111
1112 arizona_free_spk(codec);
1113
1111 return 0; 1114 return 0;
1112} 1115}
1113 1116
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index a8b3e3f701f9..59fd3e8bf899 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -1960,6 +1960,8 @@ static int wm5102_codec_remove(struct snd_soc_codec *codec)
1960 1960
1961 priv->core.arizona->dapm = NULL; 1961 priv->core.arizona->dapm = NULL;
1962 1962
1963 arizona_free_spk(codec);
1964
1963 return 0; 1965 return 0;
1964} 1966}
1965 1967
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 83ba70fe16e6..2728ac545ffe 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -2298,6 +2298,8 @@ static int wm5110_codec_remove(struct snd_soc_codec *codec)
2298 2298
2299 arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv); 2299 arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
2300 2300
2301 arizona_free_spk(codec);
2302
2301 return 0; 2303 return 0;
2302} 2304}
2303 2305
diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c
index 52d766efe14f..6b0785b5a5c5 100644
--- a/sound/soc/codecs/wm8997.c
+++ b/sound/soc/codecs/wm8997.c
@@ -1072,6 +1072,8 @@ static int wm8997_codec_remove(struct snd_soc_codec *codec)
1072 1072
1073 priv->core.arizona->dapm = NULL; 1073 priv->core.arizona->dapm = NULL;
1074 1074
1075 arizona_free_spk(codec);
1076
1075 return 0; 1077 return 0;
1076} 1078}
1077 1079
diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c
index 012396074a8a..449f66636205 100644
--- a/sound/soc/codecs/wm8998.c
+++ b/sound/soc/codecs/wm8998.c
@@ -1324,6 +1324,8 @@ static int wm8998_codec_remove(struct snd_soc_codec *codec)
1324 1324
1325 priv->core.arizona->dapm = NULL; 1325 priv->core.arizona->dapm = NULL;
1326 1326
1327 arizona_free_spk(codec);
1328
1327 return 0; 1329 return 0;
1328} 1330}
1329 1331