From patchwork Tue Jul 31 14:45:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1260731 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 603ACDF26F for ; Tue, 31 Jul 2012 15:09:03 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SwDzh-0004yd-7k; Tue, 31 Jul 2012 15:04:21 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SwDiB-0007SB-1c for linux-arm-kernel@lists.infradead.org; Tue, 31 Jul 2012 14:46:15 +0000 Received: by wibhq4 with SMTP id hq4so2268214wib.0 for ; Tue, 31 Jul 2012 07:46:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Xt30TlBfLMgW+SlYwsmEXDyqwIPKCUEWSPIZwpUP0uk=; b=a53Kfq8j82rtzPJGfXzgForTGVXcu2vUqtGjVJukmp2wnXjFaFo6nbd/+cVwb8clah Zxi6qUpigwa6QmjHwsL+y9rgnKqSmuvTj4s/C7IUZTuJU4wyp32gGxNJRxeawEsGKQwq 42oTEZ/4zMLamKeX9S4l73rQgt908SM6QMahU+NOMV3KbQKdRgdl728+tiefbyaii6Nk GWpcRTKNyCM/FxnfbVQSaGpyS3iHNzNen3dIJJ8422VujIDnnztHaaNYRltSsRQvxPaS tvqX0lEhpLjSugPdDh3atWkEjCXuG+4/xUyRIEtZI9vouIHxFTXTt0wjwm9kNt6lqH32 kDHg== Received: by 10.180.97.33 with SMTP id dx1mr7443562wib.18.1343745963773; Tue, 31 Jul 2012 07:46:03 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id j6sm695412wiy.4.2012.07.31.07.46.02 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 07:46:03 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements Date: Tue, 31 Jul 2012 15:45:41 +0100 Message-Id: <1343745944-18418-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343745944-18418-1-git-send-email-lee.jones@linaro.org> References: <1343745944-18418-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlJB+On6FgkrJSyjdrWli5nx/IRJhN5R7jEP16Qhjt8cWUGksuh5hSEZGYYLawFVhSYoPLX X-Spam-Note: CRM114 invocation failed X-Spam-Note: SpamAssassin invocation failed Cc: ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, linus.walleij@stericsson.com, arnd@arndb.de, broonie@opensource.wolfsonmicro.com, olalilja@yahoo.se, STEricsson_nomadik_linux@list.st.com, Lee Jones X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If codec->control_data is not populated SoC Core assumes we want to use regmap, which fails catastrophically, as we don't have one: Unable to handle kernel NULL pointer dereference at virtual address 00000080 pgd = c0004000 [00000080] *pgd=00000000 Internal error: Oops: 17 [#1] PREEMPT SMP ARM Modules linked in: CPU: 1 Not tainted (3.5.0-rc6-00884-g0b2419e-dirty #130) PC is at regmap_read+0x10/0x5c LR is at hw_read+0x80/0x90 pc : [] lr : [] psr: 60000013 Signed-off-by: Lee Jones --- sound/soc/codecs/ab8500-codec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 3c79592..23b4018 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c @@ -2406,6 +2406,10 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec) /* Setup AB8500 according to board-settings */ pdata = (struct ab8500_platform_data *)dev_get_platdata(dev->parent); + + /* Inform SoC Core that we have our own I/O arrangements. */ + codec->control_data = (void *)true; + status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); if (status < 0) { pr_err("%s: Failed to setup mics (%d)!\n", __func__, status);