Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c7ef410 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mark Brown
Browse files

ASoC: fsl: set correct platform drvdata in pcm030_fabric_probe()



platform_set_drvdata(op, pdata) in pcm030_fabric_probe()
will be overwrited when calling snd_soc_register_card(card),
but cm030_fabric_remove() use drvdata as a type of struct
pcm030_audio_data, so we should move platform_set_drvdata()
below snd_soc_register_card() call.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 23d8bb3b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -69,7 +69,6 @@ static int pcm030_fabric_probe(struct platform_device *op)
		return -ENOMEM;

	card->dev = &op->dev;
	platform_set_drvdata(op, pdata);

	pdata->card = card;

@@ -98,6 +97,8 @@ static int pcm030_fabric_probe(struct platform_device *op)
	if (ret)
		dev_err(&op->dev, "snd_soc_register_card() failed: %d\n", ret);

	platform_set_drvdata(op, pdata);

	return ret;
}