ASoC: mini2440: Fix uda134x codec problem.

ASoC audio for mini2440 platform in current kenrel doesn't work.
First problem is samsung_asoc_dma device is missing in initialization.
Next problem is with codec. Codec is initialized but never probed
because no platform_device exist for codec driver. It leads to errors
during codec binding to asoc dai. Next problem was platform data which
was passed from board to asoc main driver but not passed to codec when
called codec_soc_probe().

Following patch should fix issues. But not sure if in correct way.
Please review.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org

authored by Marek Belisko and committed by Mark Brown a110f4ef 27380fb8

+11 -2
+7
arch/arm/mach-s3c2440/mach-mini2440.c
··· 506 506 }, 507 507 }; 508 508 509 + static struct platform_device uda1340_codec = { 510 + .name = "uda134x-codec", 511 + .id = -1, 512 + }; 513 + 509 514 static struct platform_device *mini2440_devices[] __initdata = { 510 515 &s3c_device_ohci, 511 516 &s3c_device_wdt, ··· 526 521 &s3c_device_nand, 527 522 &s3c_device_sdi, 528 523 &s3c_device_iis, 524 + &uda1340_codec, 529 525 &mini2440_audio, 526 + &samsung_asoc_dma, 530 527 }; 531 528 532 529 static void __init mini2440_map_io(void)
+2 -1
sound/soc/codecs/uda134x.c
··· 486 486 static int uda134x_soc_probe(struct snd_soc_codec *codec) 487 487 { 488 488 struct uda134x_priv *uda134x; 489 - struct uda134x_platform_data *pd = dev_get_drvdata(codec->card->dev); 489 + struct uda134x_platform_data *pd = codec->card->dev->platform_data; 490 + 490 491 int ret; 491 492 492 493 printk(KERN_INFO "UDA134X SoC Audio Codec\n");
+2 -1
sound/soc/samsung/s3c24xx_uda134x.c
··· 219 219 static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = { 220 220 .name = "UDA134X", 221 221 .stream_name = "UDA134X", 222 - .codec_name = "uda134x-hifi", 222 + .codec_name = "uda134x-codec", 223 223 .codec_dai_name = "uda134x-hifi", 224 224 .cpu_dai_name = "s3c24xx-iis", 225 225 .ops = &s3c24xx_uda134x_ops, ··· 314 314 315 315 platform_set_drvdata(s3c24xx_uda134x_snd_device, 316 316 &snd_soc_s3c24xx_uda134x); 317 + platform_device_add_data(s3c24xx_uda134x_snd_device, &s3c24xx_uda134x, sizeof(s3c24xx_uda134x)); 317 318 ret = platform_device_add(s3c24xx_uda134x_snd_device); 318 319 if (ret) { 319 320 printk(KERN_ERR "S3C24XX_UDA134X SoC Audio: Unable to add\n");