From patchwork Fri Jul 27 12:38:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1249471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 66BD73FD48 for ; Fri, 27 Jul 2012 12:51:56 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SujvJ-0001r9-Lj; Fri, 27 Jul 2012 12:45:41 +0000 Received: from mail-we0-f177.google.com ([74.125.82.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Sujpv-0001ER-5W for linux-arm-kernel@lists.infradead.org; Fri, 27 Jul 2012 12:40:07 +0000 Received: by weyr3 with SMTP id r3so2249456wey.36 for ; Fri, 27 Jul 2012 05:39:04 -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=Kt/UczIOIi/OO+2PDvul7/aOYn19tIx/pUNXHui5NmEUqHB6vkzato3VaPW8zESK7V hPde5LNuohP1xVPBmaLpkkm3asi6kY1O0Fus5YjmkFnTYwBHpxp6YL70+O4bi/AeNkzQ iqedvSJIuR8UV2c/1zI3GJxdLnFwQteiINhPHqF10BIJxIA8FkeK4lNwXakOegMBPkPb cigol31jx9dPtQNIWZUOiVcm+y7hyUABhjEnr4ILwZ3ofK39Dh56ShEyT2m8+S9MoG5i x5ZEiyzmqJdRcgOVMAn7/UXIBMtEuMpRGafCe2u5jrsf/pBQZyPnH7vzkS3GcBtH5vis FY+Q== Received: by 10.216.62.21 with SMTP id x21mr1150580wec.202.1343392744621; Fri, 27 Jul 2012 05:39:04 -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 ef5sm6242502wib.3.2012.07.27.05.39.03 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jul 2012 05:39:04 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements Date: Fri, 27 Jul 2012 13:38:49 +0100 Message-Id: <1343392734-11805-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343392734-11805-1-git-send-email-lee.jones@linaro.org> References: <1343392734-11805-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlwBhSIVY2LxP3xeiWqMeDniz2I1Y6K0IcywgG9mnQhpGsO3/QMeEd/2oynYTrO7nheLWC9 X-Spam-Note: CRM114 invocation failed X-Spam-Note: SpamAssassin invocation failed Cc: ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, sameo@linux.intel.com, arnd@arndb.de, broonie@opensource.wolfsonmicro.com, olalilja@yahoo.se, STEricsson_nomadik_linux@list.st.com, Lee Jones , lrg@ti.com, linus.walleij@stericsson.com 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);