ASoC: Samsung: set drvdata before adding secondary device
authorPrathyush K <prathyush.k@samsung.com>
Tue, 2 Apr 2013 11:23:02 +0000 (16:53 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Apr 2013 16:56:44 +0000 (17:56 +0100)
commitc6f9b1eb0e5df468891eff17f981b76c86f95f3a
tree645e8062960737509820ff14cbbaf3be766b8f6b
parenta9b977ecd3dbc5d4f0fe0b3d5c66d284859b1f2a
ASoC: Samsung: set drvdata before adding secondary device

Currently, a new platform device is created for secondary device
by calling platform_device_register_resndata and then the drvdata
is set for this device.

The following patch has been added to driver core:
"driver core: fix possible missing of device probe".

This results in the added device getting probed immediately but
the drvdata for the secondary device is not yet set.
This patch removes the platform_device_register_resndata call and
instead calls platform_device_alloc, platform_set_drvdata and
platform_device_add which fixes the above issue.

Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/samsung/i2s.c