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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Wei Yongjun 2013-11-09 08:41:14 +08:00 committed by Mark Brown
parent 23d8bb3bb6
commit 6c7ef410c9
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}