From 7e5d8706dd3ee19f8626977935ab16e59b3603be Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Mon, 8 Dec 2014 18:45:54 +0100 Subject: ASoC: samsung: i2s: Add missing assignment of variant_regs Add assignment of the variant_regs field which is missing in commit a5a56871f804edac93a53b5e871c0e9818fb9033 ("ASoC: samsung: add support for exynos7 I2S controller"). Without this attempting to probe the secondary DAI fails with an error like: [ 1.763026] Unable to handle kernel NULL pointer dereference at virtual address 0000000c [ 1.780895] pgd = c0004000 [ 1.783606] [0000000c] *pgd=00000000 [ 1.838255] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 1.843514] Modules linked in: [ 1.846558] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.0-rc1-00009-g5dcb01e-dirty #1521 [ 1.854887] task: ee00a800 ti: ee088000 task.ti: ee088000 [ 1.860284] PC is at i2s_txctrl+0x40/0x2d4 [ 1.864350] LR is at i2s_txctrl+0x28/0x2d4 [ 1.868428] pc : [] lr : [] psr: 60000153 [ 1.868428] sp : ee089dc0 ip : 00000000 fp : ee21f000 [ 1.879883] r10: 00000000 r9 : ee21fb00 r8 : c06406c4 [ 1.885091] r7 : ee21fb00 r6 : 00000000 r5 : f00f6000 r4 : ed943410 [ 1.891601] r3 : 0000016c r2 : c0464550 r1 : c055cef8 r0 : ed943610 [ 1.898113] Flags: nZCv IRQs on FIQs off Mode SVC_32 ISA ARM Segment kernel [ 1.905490] Control: 10c5387d Table: 4000404a DAC: 00000015 [ 1.911218] Process swapper/0 (pid: 1, stack limit = 0xee088240) [ 1.917208] Stack: (0xee089dc0 to 0xee08a000) ... [ 2.068431] [] (i2s_txctrl) from [] (samsung_i2s_dai_probe+0xb8/0x450) [ 2.076676] [] (samsung_i2s_dai_probe) from [] (snd_soc_register_card+0xd98/0x1348) [ 2.086044] [] (snd_soc_register_card) from [] (odroidx2_audio_probe+0xa8/0x11c) [ 2.095160] [] (odroidx2_audio_probe) from [] (platform_drv_probe+0x48/0xa4) [ 2.103922] [] (platform_drv_probe) from [] (driver_probe_device+0x10c/0x22c) [ 2.112773] [] (driver_probe_device) from [] (__driver_attach+0x8c/0x90) [ 2.121192] [] (__driver_attach) from [] (bus_for_each_dev+0x54/0x88) [ 2.129352] [] (bus_for_each_dev) from [] (bus_add_driver+0xd4/0x1d0) [ 2.137510] [] (bus_add_driver) from [] (driver_register+0x78/0xf4) [ 2.145499] [] (driver_register) from [] (do_one_initcall+0x80/0x1b8) [ 2.153670] [] (do_one_initcall) from [] (kernel_init_freeable+0xfc/0x1c8) [ 2.162260] [] (kernel_init_freeable) from [] (kernel_init+0x8/0xec) [ 2.170330] [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) [ 2.177873] Code: e5940000 e59f128c e59f228c e2800010 (e59c700c) Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown --- sound/soc/samsung/i2s.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 9d513473b300..7f98ee69d15d 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1239,6 +1239,8 @@ static int samsung_i2s_probe(struct platform_device *pdev) ret = -ENOMEM; goto err; } + + sec_dai->variant_regs = pri_dai->variant_regs; sec_dai->dma_playback.dma_addr = regs_base + I2STXDS; sec_dai->dma_playback.ch_name = "tx-sec"; -- cgit v1.2.3