ASoC: sun8i-codec: fix crash on module removal
authorVasily Khoruzhick <anarsoul@gmail.com>
Fri, 9 Nov 2018 04:31:35 +0000 (20:31 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 08:24:30 +0000 (09:24 +0100)
commit411b321f0ff5856a244660997678957013ca4644
treefe20d6bf042ab68d80c8234f245387923d5df55f
parentb42ab52844123694b7f0524be08c96c8408aaa37
ASoC: sun8i-codec: fix crash on module removal

[ Upstream commit 278df5e5527b633f4882f1680ad58b62a7c07bfe ]

drvdata is actually sun8i_codec, not snd_soc_card, so it crashes
when calling snd_soc_card_get_drvdata().

Drop card and scodec vars anyway since we don't need to
disable/unprepare clocks - it's already done by calling
runtime_suspend()

Drop clk_disable_unprepare() calls for the same reason.

Fixes: 36c684936fae7 ("ASoC: Add sun8i digital audio codec")
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sunxi/sun8i-codec.c