ASoC: Implement SPI device unregistration for WM8731
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 18 Feb 2009 12:44:40 +0000 (12:44 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 18 Feb 2009 14:47:20 +0000 (14:47 +0000)
Completely untested.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8731.c

index a2c478e53d54c2d2c1e7180f367e54388222cf9d..4191bdb803bf53cc81d176427fd2a44a52c2fc90 100644 (file)
@@ -655,12 +655,17 @@ static int __devinit wm8731_spi_probe(struct spi_device *spi)
        codec->hw_write = (hw_write_t)wm8731_spi_write;
        codec->dev = &spi->dev;
 
+       spi->dev.driver_data = wm8731;
+
        return wm8731_register(wm8731);
 }
 
 static int __devexit wm8731_spi_remove(struct spi_device *spi)
 {
-       /* FIXME: This isn't actually implemented... */
+       struct wm8731_priv *wm8731 = spi->dev.driver_data;
+
+       wm8731_unregister(wm8731);
+
        return 0;
 }