mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
ASoC: WM8903: Free IRQ on device removal
Without this, request_irq on subsequent device initialization fails, and the codec cannot be used. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
29591ed4ac
commit
f99847a690
1 changed files with 5 additions and 0 deletions
|
@ -2046,8 +2046,13 @@ static int wm8903_probe(struct snd_soc_codec *codec)
|
||||||
/* power down chip */
|
/* power down chip */
|
||||||
static int wm8903_remove(struct snd_soc_codec *codec)
|
static int wm8903_remove(struct snd_soc_codec *codec)
|
||||||
{
|
{
|
||||||
|
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
|
||||||
|
|
||||||
wm8903_free_gpio(codec);
|
wm8903_free_gpio(codec);
|
||||||
wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||||
|
if (wm8903->irq)
|
||||||
|
free_irq(wm8903->irq, codec);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue