From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Cliff Cai <cliff.cai@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>, Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org
Subject: [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it
Date: Wed, 28 Sep 2011 13:47:41 +0800 [thread overview]
Message-ID: <1317188861.13692.1.camel@phoenix> (raw)
Currently codec->control_data is not initialized before calling
process_sigma_firmware(codec->control_data, ADAU1701_FIRMWARE).
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/adau1701.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 2758d5f..1354902 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -88,6 +88,7 @@
struct adau1701 {
unsigned int dai_fmt;
+ void *control_data;
};
static const struct snd_kcontrol_new adau1701_controls[] = {
@@ -455,9 +456,11 @@ static struct snd_soc_dai_driver adau1701_dai = {
static int adau1701_probe(struct snd_soc_codec *codec)
{
+ struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
int ret;
codec->dapm.idle_bias_off = 1;
+ codec->control_data = adau1701->control_data;
ret = adau1701_load_firmware(codec);
if (ret)
@@ -500,6 +503,7 @@ static __devinit int adau1701_i2c_probe(struct i2c_client *client,
return -ENOMEM;
i2c_set_clientdata(client, adau1701);
+ adau1701->control_data = client;
ret = snd_soc_register_codec(&client->dev, &adau1701_codec_drv,
&adau1701_dai, 1);
if (ret < 0)
--
1.7.4.1
next reply other threads:[~2011-09-28 5:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 5:47 Axel Lin [this message]
2011-09-28 5:48 ` [PATCH 2/2] ASoC: adau1701: Fix prototype for adau1701_set_sysclk Axel Lin
2011-09-28 12:21 ` Mark Brown
2011-09-28 7:13 ` [PATCH 1/2] ASoC: adau1701: Initialize codec->control_data before using it Lars-Peter Clausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317188861.13692.1.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cliff.cai@analog.com \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).