summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorRohit Kumar2018-06-06 10:55:24 +0200
committerMark Brown2018-06-18 13:54:38 +0200
commitd5c4e972d512ae0b59108ca92b9b35bc5cf5c14e (patch)
tree1c4d9823de8e55fa16f8b63310930f2d040c6f81 /sound/soc
parentASoC: rsnd: add rsnd_daidrv_get() (diff)
downloadkernel-qcow2-linux-d5c4e972d512ae0b59108ca92b9b35bc5cf5c14e.tar.gz
kernel-qcow2-linux-d5c4e972d512ae0b59108ca92b9b35bc5cf5c14e.tar.xz
kernel-qcow2-linux-d5c4e972d512ae0b59108ca92b9b35bc5cf5c14e.zip
ASoC: qcom: apq8096: set card as device drvdata
snd_soc_card is retrieved as device drvdata during unbind(). Set it as drvdata during bind() to avoid memory corruption during unbind(). Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/qcom/apq8096.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
index 561cd429e6f2..239b8cb77bdb 100644
--- a/sound/soc/qcom/apq8096.c
+++ b/sound/soc/qcom/apq8096.c
@@ -140,6 +140,7 @@ static int apq8096_bind(struct device *dev)
component_bind_all(dev, card);
card->dev = dev;
+ dev_set_drvdata(dev, card);
ret = apq8096_sbc_parse_of(card);
if (ret) {
dev_err(dev, "Error parsing OF data\n");