From: Lee Jones Date: Tue, 31 Jul 2012 14:45:41 +0000 (+0100) Subject: ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements X-Git-Tag: MMI-PSA29.97-13-9~15766^2~103^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=58f598ff0bb0c030e026a0738450c6a46248f6a8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 3c795921c5f6..23b40186f9b8 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);