diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-04-20 02:20:31 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-04-20 02:29:19 -0400 |
commit | d4a8ca246146099e9068fc87cd2bc565896bc186 (patch) | |
tree | 670d9890674e44bc9fa850b250d8ff5c1d5ddfdf | |
parent | b2c812e22de88bb79c290c0e718280f10b64a48d (diff) |
ASoC: missing conversions to snd_soc_codec_*_drvdata()
Conversions to snd_soc_codec_{get|set}_drvdata() were missing in some files
in the previous commit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/soc/codecs/tlv320aic26.c | 14 | ||||
-rw-r--r-- | sound/soc/codecs/twl4030.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/twl6040.c | 20 |
3 files changed, 18 insertions, 18 deletions
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 357b609196e3..5856f7aae4d9 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c | |||
@@ -48,7 +48,7 @@ struct aic26 { | |||
48 | static unsigned int aic26_reg_read(struct snd_soc_codec *codec, | 48 | static unsigned int aic26_reg_read(struct snd_soc_codec *codec, |
49 | unsigned int reg) | 49 | unsigned int reg) |
50 | { | 50 | { |
51 | struct aic26 *aic26 = codec->private_data; | 51 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
52 | u16 *cache = codec->reg_cache; | 52 | u16 *cache = codec->reg_cache; |
53 | u16 cmd, value; | 53 | u16 cmd, value; |
54 | u8 buffer[2]; | 54 | u8 buffer[2]; |
@@ -92,7 +92,7 @@ static unsigned int aic26_reg_read_cache(struct snd_soc_codec *codec, | |||
92 | static int aic26_reg_write(struct snd_soc_codec *codec, unsigned int reg, | 92 | static int aic26_reg_write(struct snd_soc_codec *codec, unsigned int reg, |
93 | unsigned int value) | 93 | unsigned int value) |
94 | { | 94 | { |
95 | struct aic26 *aic26 = codec->private_data; | 95 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
96 | u16 *cache = codec->reg_cache; | 96 | u16 *cache = codec->reg_cache; |
97 | u16 cmd; | 97 | u16 cmd; |
98 | u8 buffer[4]; | 98 | u8 buffer[4]; |
@@ -131,7 +131,7 @@ static int aic26_hw_params(struct snd_pcm_substream *substream, | |||
131 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 131 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
132 | struct snd_soc_device *socdev = rtd->socdev; | 132 | struct snd_soc_device *socdev = rtd->socdev; |
133 | struct snd_soc_codec *codec = socdev->card->codec; | 133 | struct snd_soc_codec *codec = socdev->card->codec; |
134 | struct aic26 *aic26 = codec->private_data; | 134 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
135 | int fsref, divisor, wlen, pval, jval, dval, qval; | 135 | int fsref, divisor, wlen, pval, jval, dval, qval; |
136 | u16 reg; | 136 | u16 reg; |
137 | 137 | ||
@@ -198,7 +198,7 @@ static int aic26_hw_params(struct snd_pcm_substream *substream, | |||
198 | static int aic26_mute(struct snd_soc_dai *dai, int mute) | 198 | static int aic26_mute(struct snd_soc_dai *dai, int mute) |
199 | { | 199 | { |
200 | struct snd_soc_codec *codec = dai->codec; | 200 | struct snd_soc_codec *codec = dai->codec; |
201 | struct aic26 *aic26 = codec->private_data; | 201 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
202 | u16 reg = aic26_reg_read_cache(codec, AIC26_REG_DAC_GAIN); | 202 | u16 reg = aic26_reg_read_cache(codec, AIC26_REG_DAC_GAIN); |
203 | 203 | ||
204 | dev_dbg(&aic26->spi->dev, "aic26_mute(dai=%p, mute=%i)\n", | 204 | dev_dbg(&aic26->spi->dev, "aic26_mute(dai=%p, mute=%i)\n", |
@@ -217,7 +217,7 @@ static int aic26_set_sysclk(struct snd_soc_dai *codec_dai, | |||
217 | int clk_id, unsigned int freq, int dir) | 217 | int clk_id, unsigned int freq, int dir) |
218 | { | 218 | { |
219 | struct snd_soc_codec *codec = codec_dai->codec; | 219 | struct snd_soc_codec *codec = codec_dai->codec; |
220 | struct aic26 *aic26 = codec->private_data; | 220 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
221 | 221 | ||
222 | dev_dbg(&aic26->spi->dev, "aic26_set_sysclk(dai=%p, clk_id==%i," | 222 | dev_dbg(&aic26->spi->dev, "aic26_set_sysclk(dai=%p, clk_id==%i," |
223 | " freq=%i, dir=%i)\n", | 223 | " freq=%i, dir=%i)\n", |
@@ -234,7 +234,7 @@ static int aic26_set_sysclk(struct snd_soc_dai *codec_dai, | |||
234 | static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) | 234 | static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) |
235 | { | 235 | { |
236 | struct snd_soc_codec *codec = codec_dai->codec; | 236 | struct snd_soc_codec *codec = codec_dai->codec; |
237 | struct aic26 *aic26 = codec->private_data; | 237 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
238 | 238 | ||
239 | dev_dbg(&aic26->spi->dev, "aic26_set_fmt(dai=%p, fmt==%i)\n", | 239 | dev_dbg(&aic26->spi->dev, "aic26_set_fmt(dai=%p, fmt==%i)\n", |
240 | codec_dai, fmt); | 240 | codec_dai, fmt); |
@@ -430,7 +430,7 @@ static int aic26_spi_probe(struct spi_device *spi) | |||
430 | /* Setup what we can in the codec structure so that the register | 430 | /* Setup what we can in the codec structure so that the register |
431 | * access functions will work as expected. More will be filled | 431 | * access functions will work as expected. More will be filled |
432 | * out when it is probed by the SoC CODEC part of this driver */ | 432 | * out when it is probed by the SoC CODEC part of this driver */ |
433 | aic26->codec.private_data = aic26; | 433 | snd_soc_codec_set_drvdata(&aic26->codec, aic26); |
434 | aic26->codec.name = "aic26"; | 434 | aic26->codec.name = "aic26"; |
435 | aic26->codec.owner = THIS_MODULE; | 435 | aic26->codec.owner = THIS_MODULE; |
436 | aic26->codec.dai = &aic26_dai; | 436 | aic26->codec.dai = &aic26_dai; |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 4eb5a2e59f3c..2e025a3a2618 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -2001,7 +2001,7 @@ static int twl4030_voice_set_dai_sysclk(struct snd_soc_dai *codec_dai, | |||
2001 | int clk_id, unsigned int freq, int dir) | 2001 | int clk_id, unsigned int freq, int dir) |
2002 | { | 2002 | { |
2003 | struct snd_soc_codec *codec = codec_dai->codec; | 2003 | struct snd_soc_codec *codec = codec_dai->codec; |
2004 | struct twl4030_priv *twl4030 = codec->private_data; | 2004 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); |
2005 | 2005 | ||
2006 | if (freq != 26000000) { | 2006 | if (freq != 26000000) { |
2007 | dev_err(codec->dev, "Unsupported APLL mclk: %u, the Voice" | 2007 | dev_err(codec->dev, "Unsupported APLL mclk: %u, the Voice" |
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 108c51a513c8..ead6d4b43b25 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -364,7 +364,7 @@ static int twl6040_power_mode_event(struct snd_soc_dapm_widget *w, | |||
364 | struct snd_kcontrol *kcontrol, int event) | 364 | struct snd_kcontrol *kcontrol, int event) |
365 | { | 365 | { |
366 | struct snd_soc_codec *codec = w->codec; | 366 | struct snd_soc_codec *codec = w->codec; |
367 | struct twl6040_data *priv = codec->private_data; | 367 | struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); |
368 | 368 | ||
369 | if (SND_SOC_DAPM_EVENT_ON(event)) | 369 | if (SND_SOC_DAPM_EVENT_ON(event)) |
370 | priv->non_lp++; | 370 | priv->non_lp++; |
@@ -378,7 +378,7 @@ static int twl6040_power_mode_event(struct snd_soc_dapm_widget *w, | |||
378 | static irqreturn_t twl6040_naudint_handler(int irq, void *data) | 378 | static irqreturn_t twl6040_naudint_handler(int irq, void *data) |
379 | { | 379 | { |
380 | struct snd_soc_codec *codec = data; | 380 | struct snd_soc_codec *codec = data; |
381 | struct twl6040_data *priv = codec->private_data; | 381 | struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); |
382 | u8 intid; | 382 | u8 intid; |
383 | 383 | ||
384 | twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &intid, TWL6040_REG_INTID); | 384 | twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &intid, TWL6040_REG_INTID); |
@@ -636,7 +636,7 @@ static int twl6040_add_widgets(struct snd_soc_codec *codec) | |||
636 | static int twl6040_power_up_completion(struct snd_soc_codec *codec, | 636 | static int twl6040_power_up_completion(struct snd_soc_codec *codec, |
637 | int naudint) | 637 | int naudint) |
638 | { | 638 | { |
639 | struct twl6040_data *priv = codec->private_data; | 639 | struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); |
640 | int time_left; | 640 | int time_left; |
641 | u8 intid; | 641 | u8 intid; |
642 | 642 | ||
@@ -660,7 +660,7 @@ static int twl6040_power_up_completion(struct snd_soc_codec *codec, | |||
660 | static int twl6040_set_bias_level(struct snd_soc_codec *codec, | 660 | static int twl6040_set_bias_level(struct snd_soc_codec *codec, |
661 | enum snd_soc_bias_level level) | 661 | enum snd_soc_bias_level level) |
662 | { | 662 | { |
663 | struct twl6040_data *priv = codec->private_data; | 663 | struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); |
664 | int audpwron = priv->audpwron; | 664 | int audpwron = priv->audpwron; |
665 | int naudint = priv->naudint; | 665 | int naudint = priv->naudint; |
666 | int ret; | 666 | int ret; |
@@ -753,7 +753,7 @@ static int twl6040_startup(struct snd_pcm_substream *substream, | |||
753 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 753 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
754 | struct snd_soc_device *socdev = rtd->socdev; | 754 | struct snd_soc_device *socdev = rtd->socdev; |
755 | struct snd_soc_codec *codec = socdev->card->codec; | 755 | struct snd_soc_codec *codec = socdev->card->codec; |
756 | struct twl6040_data *priv = codec->private_data; | 756 | struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); |
757 | 757 | ||
758 | if (!priv->sysclk) { | 758 | if (!priv->sysclk) { |
759 | dev_err(codec->dev, | 759 | dev_err(codec->dev, |
@@ -786,7 +786,7 @@ static int twl6040_hw_params(struct snd_pcm_substream *substream, | |||
786 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 786 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
787 | struct snd_soc_device *socdev = rtd->socdev; | 787 | struct snd_soc_device *socdev = rtd->socdev; |
788 | struct snd_soc_codec *codec = socdev->card->codec; | 788 | struct snd_soc_codec *codec = socdev->card->codec; |
789 | struct twl6040_data *priv = codec->private_data; | 789 | struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); |
790 | u8 lppllctl; | 790 | u8 lppllctl; |
791 | int rate; | 791 | int rate; |
792 | 792 | ||
@@ -822,7 +822,7 @@ static int twl6040_trigger(struct snd_pcm_substream *substream, | |||
822 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 822 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
823 | struct snd_soc_device *socdev = rtd->socdev; | 823 | struct snd_soc_device *socdev = rtd->socdev; |
824 | struct snd_soc_codec *codec = socdev->card->codec; | 824 | struct snd_soc_codec *codec = socdev->card->codec; |
825 | struct twl6040_data *priv = codec->private_data; | 825 | struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); |
826 | 826 | ||
827 | switch (cmd) { | 827 | switch (cmd) { |
828 | case SNDRV_PCM_TRIGGER_START: | 828 | case SNDRV_PCM_TRIGGER_START: |
@@ -849,7 +849,7 @@ static int twl6040_set_dai_sysclk(struct snd_soc_dai *codec_dai, | |||
849 | int clk_id, unsigned int freq, int dir) | 849 | int clk_id, unsigned int freq, int dir) |
850 | { | 850 | { |
851 | struct snd_soc_codec *codec = codec_dai->codec; | 851 | struct snd_soc_codec *codec = codec_dai->codec; |
852 | struct twl6040_data *priv = codec->private_data; | 852 | struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); |
853 | u8 hppllctl, lppllctl; | 853 | u8 hppllctl, lppllctl; |
854 | 854 | ||
855 | hppllctl = twl6040_read_reg_cache(codec, TWL6040_REG_HPPLLCTL); | 855 | hppllctl = twl6040_read_reg_cache(codec, TWL6040_REG_HPPLLCTL); |
@@ -1095,7 +1095,7 @@ static int __devinit twl6040_codec_probe(struct platform_device *pdev) | |||
1095 | codec->read = twl6040_read_reg_cache; | 1095 | codec->read = twl6040_read_reg_cache; |
1096 | codec->write = twl6040_write; | 1096 | codec->write = twl6040_write; |
1097 | codec->set_bias_level = twl6040_set_bias_level; | 1097 | codec->set_bias_level = twl6040_set_bias_level; |
1098 | codec->private_data = priv; | 1098 | snd_soc_codec_set_drvdata(codec, priv); |
1099 | codec->dai = &twl6040_dai; | 1099 | codec->dai = &twl6040_dai; |
1100 | codec->num_dai = 1; | 1100 | codec->num_dai = 1; |
1101 | codec->reg_cache_size = ARRAY_SIZE(twl6040_reg); | 1101 | codec->reg_cache_size = ARRAY_SIZE(twl6040_reg); |
@@ -1183,7 +1183,7 @@ cache_err: | |||
1183 | 1183 | ||
1184 | static int __devexit twl6040_codec_remove(struct platform_device *pdev) | 1184 | static int __devexit twl6040_codec_remove(struct platform_device *pdev) |
1185 | { | 1185 | { |
1186 | struct twl6040_data *priv = twl6040_codec->private_data; | 1186 | struct twl6040_data *priv = snd_soc_codec_get_drvdata(twl6040_codec); |
1187 | int audpwron = priv->audpwron; | 1187 | int audpwron = priv->audpwron; |
1188 | int naudint = priv->naudint; | 1188 | int naudint = priv->naudint; |
1189 | 1189 | ||