Commit 26806a42 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: ssm2602: Do not dereference codec->control_data

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent d890a1a4
...@@ -294,7 +294,6 @@ static int ssm2602_startup(struct snd_pcm_substream *substream, ...@@ -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_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
struct i2c_client *i2c = codec->control_data;
struct snd_pcm_runtime *master_runtime; struct snd_pcm_runtime *master_runtime;
/* The DAI has shared clocks so if we already have a playback or /* 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, ...@@ -303,7 +302,7 @@ static int ssm2602_startup(struct snd_pcm_substream *substream,
*/ */
if (ssm2602->master_substream) { if (ssm2602->master_substream) {
master_runtime = ssm2602->master_substream->runtime; 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->sample_bits,
master_runtime->rate); master_runtime->rate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment