Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Charles Keepax and committed by
Mark Brown
54dca701 f55532a0

+25
+12
sound/soc/codecs/arizona.c
··· 249 249 } 250 250 EXPORT_SYMBOL_GPL(arizona_init_spk); 251 251 252 + int 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 + } 262 + EXPORT_SYMBOL_GPL(arizona_free_spk); 263 + 252 264 static const struct snd_soc_dapm_route arizona_mono_routes[] = { 253 265 { "OUT1R", NULL, "OUT1L" }, 254 266 { "OUT2R", NULL, "OUT2L" },
+2
sound/soc/codecs/arizona.h
··· 307 307 extern int arizona_init_gpio(struct snd_soc_codec *codec); 308 308 extern int arizona_init_mono(struct snd_soc_codec *codec); 309 309 310 + extern int arizona_free_spk(struct snd_soc_codec *codec); 311 + 310 312 extern int arizona_init_dai(struct arizona_priv *priv, int dai); 311 313 312 314 int arizona_set_output_mode(struct snd_soc_codec *codec, int output,
+3
sound/soc/codecs/cs47l24.c
··· 1108 1108 priv->core.arizona->dapm = NULL; 1109 1109 1110 1110 arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv); 1111 + 1112 + arizona_free_spk(codec); 1113 + 1111 1114 return 0; 1112 1115 } 1113 1116
+2
sound/soc/codecs/wm5102.c
··· 1960 1960 1961 1961 priv->core.arizona->dapm = NULL; 1962 1962 1963 + arizona_free_spk(codec); 1964 + 1963 1965 return 0; 1964 1966 } 1965 1967
+2
sound/soc/codecs/wm5110.c
··· 2298 2298 2299 2299 arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv); 2300 2300 2301 + arizona_free_spk(codec); 2302 + 2301 2303 return 0; 2302 2304 } 2303 2305
+2
sound/soc/codecs/wm8997.c
··· 1072 1072 1073 1073 priv->core.arizona->dapm = NULL; 1074 1074 1075 + arizona_free_spk(codec); 1076 + 1075 1077 return 0; 1076 1078 } 1077 1079
+2
sound/soc/codecs/wm8998.c
··· 1324 1324 1325 1325 priv->core.arizona->dapm = NULL; 1326 1326 1327 + arizona_free_spk(codec); 1328 + 1327 1329 return 0; 1328 1330 } 1329 1331