* [PATCH] ASoC: ssm2602: Do not dereference codec->control_data
@ 2011-09-20 6:19 Lars-Peter Clausen
2011-09-20 11:20 ` Liam Girdwood
2011-09-20 12:04 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Lars-Peter Clausen @ 2011-09-20 6:19 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, device-drivers-devel
The driver assumes that control_data points to the drivers i2c_client struct,
but this is no longer the case since the ASoC core has switched to regmap.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/ssm2602.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index 84f4ad5..cceb002 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -294,7 +294,6 @@ static int ssm2602_startup(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec;
struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
- struct i2c_client *i2c = codec->control_data;
struct snd_pcm_runtime *master_runtime;
/* The DAI has shared clocks so if we already have a playback or
@@ -303,7 +302,7 @@ static int ssm2602_startup(struct snd_pcm_substream *substream,
*/
if (ssm2602->master_substream) {
master_runtime = ssm2602->master_substream->runtime;
- dev_dbg(&i2c->dev, "Constraining to %d bits at %dHz\n",
+ dev_dbg(codec->dev, "Constraining to %d bits at %dHz\n",
master_runtime->sample_bits,
master_runtime->rate);
--
1.7.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: ssm2602: Do not dereference codec->control_data
2011-09-20 6:19 [PATCH] ASoC: ssm2602: Do not dereference codec->control_data Lars-Peter Clausen
@ 2011-09-20 11:20 ` Liam Girdwood
2011-09-20 12:04 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-09-20 11:20 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: alsa-devel, Mark Brown, device-drivers-devel
On Tue, 2011-09-20 at 08:19 +0200, Lars-Peter Clausen wrote:
> The driver assumes that control_data points to the drivers i2c_client struct,
> but this is no longer the case since the ASoC core has switched to regmap.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> sound/soc/codecs/ssm2602.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
> index 84f4ad5..cceb002 100644
> --- a/sound/soc/codecs/ssm2602.c
> +++ b/sound/soc/codecs/ssm2602.c
> @@ -294,7 +294,6 @@ static int ssm2602_startup(struct snd_pcm_substream *substream,
> struct snd_soc_pcm_runtime *rtd = substream->private_data;
> struct snd_soc_codec *codec = rtd->codec;
> struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
> - struct i2c_client *i2c = codec->control_data;
> struct snd_pcm_runtime *master_runtime;
>
> /* The DAI has shared clocks so if we already have a playback or
> @@ -303,7 +302,7 @@ static int ssm2602_startup(struct snd_pcm_substream *substream,
> */
> if (ssm2602->master_substream) {
> master_runtime = ssm2602->master_substream->runtime;
> - dev_dbg(&i2c->dev, "Constraining to %d bits at %dHz\n",
> + dev_dbg(codec->dev, "Constraining to %d bits at %dHz\n",
> master_runtime->sample_bits,
> master_runtime->rate);
>
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: ssm2602: Do not dereference codec->control_data
2011-09-20 6:19 [PATCH] ASoC: ssm2602: Do not dereference codec->control_data Lars-Peter Clausen
2011-09-20 11:20 ` Liam Girdwood
@ 2011-09-20 12:04 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-09-20 12:04 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: alsa-devel, Liam Girdwood, device-drivers-devel
On Tue, Sep 20, 2011 at 08:19:58AM +0200, Lars-Peter Clausen wrote:
> The driver assumes that control_data points to the drivers i2c_client struct,
> but this is no longer the case since the ASoC core has switched to regmap.
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-20 12:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-20 6:19 [PATCH] ASoC: ssm2602: Do not dereference codec->control_data Lars-Peter Clausen
2011-09-20 11:20 ` Liam Girdwood
2011-09-20 12:04 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.