[alsa-devel] [PATCH 3/3] ASoC: WM8903: Free IRQ on device removal
Stephen Warren
swarren at nvidia.com
Fri Aug 5 00:44:44 CEST 2011
Without this, request_irq on subsequent device initialization fails, and
the codec cannot be used.
Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
sound/soc/codecs/wm8903.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 43e3d76..4ad8ebd 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -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;
}
--
1.7.0.4
More information about the Alsa-devel
mailing list