diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-05-20 06:00:43 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-05-20 06:00:43 -0400 |
commit | d71f4cece4bd97d05592836202fc04ff2e7817e3 (patch) | |
tree | 6c877c7a938758b1323d9c97d46b9c536e618c69 /sound/soc/codecs/cs4270.c | |
parent | 19008bdacb9f7841166ebafe0aef361ee582ffbf (diff) | |
parent | ad8332c1302bcb4f80d593fd3eb477be9d7f5604 (diff) |
Merge branch 'topic/asoc' into for-linus
Conflicts:
sound/soc/codecs/ad1938.c
Diffstat (limited to 'sound/soc/codecs/cs4270.c')
-rw-r--r-- | sound/soc/codecs/cs4270.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 81a62d198b70..30d949239def 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
@@ -211,7 +211,7 @@ static int cs4270_set_dai_sysclk(struct snd_soc_dai *codec_dai, | |||
211 | int clk_id, unsigned int freq, int dir) | 211 | int clk_id, unsigned int freq, int dir) |
212 | { | 212 | { |
213 | struct snd_soc_codec *codec = codec_dai->codec; | 213 | struct snd_soc_codec *codec = codec_dai->codec; |
214 | struct cs4270_private *cs4270 = codec->private_data; | 214 | struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); |
215 | unsigned int rates = 0; | 215 | unsigned int rates = 0; |
216 | unsigned int rate_min = -1; | 216 | unsigned int rate_min = -1; |
217 | unsigned int rate_max = 0; | 217 | unsigned int rate_max = 0; |
@@ -270,7 +270,7 @@ static int cs4270_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
270 | unsigned int format) | 270 | unsigned int format) |
271 | { | 271 | { |
272 | struct snd_soc_codec *codec = codec_dai->codec; | 272 | struct snd_soc_codec *codec = codec_dai->codec; |
273 | struct cs4270_private *cs4270 = codec->private_data; | 273 | struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); |
274 | int ret = 0; | 274 | int ret = 0; |
275 | 275 | ||
276 | /* set DAI format */ | 276 | /* set DAI format */ |
@@ -412,7 +412,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream, | |||
412 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 412 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
413 | struct snd_soc_device *socdev = rtd->socdev; | 413 | struct snd_soc_device *socdev = rtd->socdev; |
414 | struct snd_soc_codec *codec = socdev->card->codec; | 414 | struct snd_soc_codec *codec = socdev->card->codec; |
415 | struct cs4270_private *cs4270 = codec->private_data; | 415 | struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); |
416 | int ret; | 416 | int ret; |
417 | unsigned int i; | 417 | unsigned int i; |
418 | unsigned int rate; | 418 | unsigned int rate; |
@@ -491,7 +491,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream, | |||
491 | static int cs4270_dai_mute(struct snd_soc_dai *dai, int mute) | 491 | static int cs4270_dai_mute(struct snd_soc_dai *dai, int mute) |
492 | { | 492 | { |
493 | struct snd_soc_codec *codec = dai->codec; | 493 | struct snd_soc_codec *codec = dai->codec; |
494 | struct cs4270_private *cs4270 = codec->private_data; | 494 | struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); |
495 | int reg6; | 495 | int reg6; |
496 | 496 | ||
497 | reg6 = snd_soc_read(codec, CS4270_MUTE); | 497 | reg6 = snd_soc_read(codec, CS4270_MUTE); |
@@ -524,7 +524,7 @@ static int cs4270_soc_put_mute(struct snd_kcontrol *kcontrol, | |||
524 | struct snd_ctl_elem_value *ucontrol) | 524 | struct snd_ctl_elem_value *ucontrol) |
525 | { | 525 | { |
526 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 526 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
527 | struct cs4270_private *cs4270 = codec->private_data; | 527 | struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); |
528 | int left = !ucontrol->value.integer.value[0]; | 528 | int left = !ucontrol->value.integer.value[0]; |
529 | int right = !ucontrol->value.integer.value[1]; | 529 | int right = !ucontrol->value.integer.value[1]; |
530 | 530 | ||
@@ -600,7 +600,7 @@ static int cs4270_probe(struct platform_device *pdev) | |||
600 | { | 600 | { |
601 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 601 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
602 | struct snd_soc_codec *codec = cs4270_codec; | 602 | struct snd_soc_codec *codec = cs4270_codec; |
603 | struct cs4270_private *cs4270 = codec->private_data; | 603 | struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); |
604 | int i, ret; | 604 | int i, ret; |
605 | 605 | ||
606 | /* Connect the codec to the socdev. snd_soc_new_pcms() needs this. */ | 606 | /* Connect the codec to the socdev. snd_soc_new_pcms() needs this. */ |
@@ -657,7 +657,7 @@ static int cs4270_remove(struct platform_device *pdev) | |||
657 | { | 657 | { |
658 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 658 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
659 | struct snd_soc_codec *codec = cs4270_codec; | 659 | struct snd_soc_codec *codec = cs4270_codec; |
660 | struct cs4270_private *cs4270 = codec->private_data; | 660 | struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); |
661 | 661 | ||
662 | snd_soc_free_pcms(socdev); | 662 | snd_soc_free_pcms(socdev); |
663 | regulator_bulk_disable(ARRAY_SIZE(cs4270->supplies), cs4270->supplies); | 663 | regulator_bulk_disable(ARRAY_SIZE(cs4270->supplies), cs4270->supplies); |
@@ -730,7 +730,7 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client, | |||
730 | codec->owner = THIS_MODULE; | 730 | codec->owner = THIS_MODULE; |
731 | codec->dai = &cs4270_dai; | 731 | codec->dai = &cs4270_dai; |
732 | codec->num_dai = 1; | 732 | codec->num_dai = 1; |
733 | codec->private_data = cs4270; | 733 | snd_soc_codec_set_drvdata(codec, cs4270); |
734 | codec->control_data = i2c_client; | 734 | codec->control_data = i2c_client; |
735 | codec->read = cs4270_read_reg_cache; | 735 | codec->read = cs4270_read_reg_cache; |
736 | codec->write = cs4270_i2c_write; | 736 | codec->write = cs4270_i2c_write; |
@@ -843,7 +843,7 @@ MODULE_DEVICE_TABLE(i2c, cs4270_id); | |||
843 | static int cs4270_soc_suspend(struct platform_device *pdev, pm_message_t mesg) | 843 | static int cs4270_soc_suspend(struct platform_device *pdev, pm_message_t mesg) |
844 | { | 844 | { |
845 | struct snd_soc_codec *codec = cs4270_codec; | 845 | struct snd_soc_codec *codec = cs4270_codec; |
846 | struct cs4270_private *cs4270 = codec->private_data; | 846 | struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); |
847 | int reg, ret; | 847 | int reg, ret; |
848 | 848 | ||
849 | reg = snd_soc_read(codec, CS4270_PWRCTL) | CS4270_PWRCTL_PDN_ALL; | 849 | reg = snd_soc_read(codec, CS4270_PWRCTL) | CS4270_PWRCTL_PDN_ALL; |
@@ -863,7 +863,7 @@ static int cs4270_soc_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
863 | static int cs4270_soc_resume(struct platform_device *pdev) | 863 | static int cs4270_soc_resume(struct platform_device *pdev) |
864 | { | 864 | { |
865 | struct snd_soc_codec *codec = cs4270_codec; | 865 | struct snd_soc_codec *codec = cs4270_codec; |
866 | struct cs4270_private *cs4270 = codec->private_data; | 866 | struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); |
867 | struct i2c_client *i2c_client = codec->control_data; | 867 | struct i2c_client *i2c_client = codec->control_data; |
868 | int reg; | 868 | int reg; |
869 | 869 | ||