Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f99847a6 authored by Stephen Warren's avatar Stephen Warren Committed by Mark Brown
Browse files

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: default avatarStephen Warren <swarren@nvidia.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 29591ed4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2046,8 +2046,13 @@ static int wm8903_probe(struct snd_soc_codec *codec)
/* power down chip */
static int wm8903_remove(struct snd_soc_codec *codec)
{
	struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);

	wm8903_free_gpio(codec);
	wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF);
	if (wm8903->irq)
		free_irq(wm8903->irq, codec);

	return 0;
}