From: Mark Brown Date: Wed, 18 Feb 2009 12:44:40 +0000 (+0000) Subject: ASoC: Implement SPI device unregistration for WM8731 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93b760b7072ca6972c15c798e97af3f830d8bbba;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ASoC: Implement SPI device unregistration for WM8731 Completely untested. Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index a2c478e53d54..4191bdb803bf 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -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; }