From patchwork Mon Dec 8 17:45:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 5457871 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E6941BEEA8 for ; Mon, 8 Dec 2014 17:46:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 16E8320172 for ; Mon, 8 Dec 2014 17:46:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EA5020166 for ; Mon, 8 Dec 2014 17:46:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756015AbaLHRqa (ORCPT ); Mon, 8 Dec 2014 12:46:30 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:44557 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755462AbaLHRq3 (ORCPT ); Mon, 8 Dec 2014 12:46:29 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NG900MU3YPFBP40@mailout3.samsung.com> for linux-samsung-soc@vger.kernel.org; Tue, 09 Dec 2014 02:46:27 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-8e-5485e3f3e1f2 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 66.16.20081.3F3E5845; Tue, 09 Dec 2014 02:46:27 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NG900HEOYP1QA10@mmp2.samsung.com>; Tue, 09 Dec 2014 02:46:27 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Cc: padma.v@samsung.com, drake@endlessm.com, sbkim73@samsung.com, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH] ASoC: samsung: i2s: Add missing assignment of variant_regs Date: Mon, 08 Dec 2014 18:45:54 +0100 Message-id: <1418060754-7064-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJJMWRmVeSWpSXmKPExsVy+t9jQd3Pj1tDDNpvGVpcuXiIyWLqwyds Fo/mP2a2mHF+H5PF75vf2SwOv2lntbi44guTA7vHhs9NbB6Lvmd5bFrVyebRt2UVo8fnTXIB rFFcNimpOZllqUX6dglcGQeOP2MteC1ZMWvCG6YGxh2iXYycHBICJhLzlq5gg7DFJC7cWw9k c3EICUxnlOiYt5Qdwulgkph9aSZYFZuAoUTv0T5GEFsEqOP2nE5mkCJmgY2MEkvfr2btYuTg EBbwlpjT4QtSwyKgKtF0uoEZJMwr4CqxdJcuiCkhoCAxZ5LNBEbuBYwMqxhFUwuSC4qT0nMN 9YoTc4tL89L1kvNzNzGCA+SZ1A7GlQ0WhxgFOBiVeHgXPGgJEWJNLCuuzD3EKMHBrCTCu3xn a4gQb0piZVVqUX58UWlOavEhRmkOFiVx3hs3c0OEBNITS1KzU1MLUotgskwcnFINjOnTHvyO myh+xTB/GcfuSo6P16a5azt7rXnye8105Zl6cZcl+uat33xu9qV5V0wu5j0JeP1/3q5JPxfs f63KJ9en/KCawVjra/AdceF3Mt25vW/u1LEfXX/vQbJnXvhnva2JJauVD22/uUr8g7FaxoZH z5Z+v6B9JjzGcAu3+h2p6e07P3dOmqejxFKckWioxVxUnAgA3XXingwCAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- sound/soc/samsung/i2s.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index c7aafcd..eca17dc 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1261,6 +1261,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";