aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl6040.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-04-20 02:20:31 -0400
committerTakashi Iwai <tiwai@suse.de>2010-04-20 02:29:19 -0400
commitd4a8ca246146099e9068fc87cd2bc565896bc186 (patch)
tree670d9890674e44bc9fa850b250d8ff5c1d5ddfdf /sound/soc/codecs/twl6040.c
parentb2c812e22de88bb79c290c0e718280f10b64a48d (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>
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r--sound/soc/codecs/twl6040.c20
1 files changed, 10 insertions, 10 deletions
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,
378static irqreturn_t twl6040_naudint_handler(int irq, void *data) 378static 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)
636static int twl6040_power_up_completion(struct snd_soc_codec *codec, 636static 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,
660static int twl6040_set_bias_level(struct snd_soc_codec *codec, 660static 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
1184static int __devexit twl6040_codec_remove(struct platform_device *pdev) 1184static 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