ASoC: WM8903: Free IRQ on device removal
authorStephen Warren <swarren@nvidia.com>
Thu, 4 Aug 2011 22:44:44 +0000 (16:44 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 9 Aug 2011 00:43:58 +0000 (09:43 +0900)
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>
sound/soc/codecs/wm8903.c

index 43e3d760766f5bfc31f3a11ab8acf48e9328805a..4ad8ebd290e3decbe79f181bbbd1af2a3b014d4f 100644 (file)
@@ -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;
 }