diff options
Diffstat (limited to 'sound/soc/codecs/uda1380.c')
-rw-r--r-- | sound/soc/codecs/uda1380.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index a957b4365b9d..98e4a6560f06 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
@@ -397,7 +397,7 @@ static int uda1380_pcm_prepare(struct snd_pcm_substream *substream, | |||
397 | { | 397 | { |
398 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 398 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
399 | struct snd_soc_device *socdev = rtd->socdev; | 399 | struct snd_soc_device *socdev = rtd->socdev; |
400 | struct snd_soc_codec *codec = socdev->codec; | 400 | struct snd_soc_codec *codec = socdev->card->codec; |
401 | int reg, reg_start, reg_end, clk; | 401 | int reg, reg_start, reg_end, clk; |
402 | 402 | ||
403 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 403 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
@@ -430,7 +430,7 @@ static int uda1380_pcm_hw_params(struct snd_pcm_substream *substream, | |||
430 | { | 430 | { |
431 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 431 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
432 | struct snd_soc_device *socdev = rtd->socdev; | 432 | struct snd_soc_device *socdev = rtd->socdev; |
433 | struct snd_soc_codec *codec = socdev->codec; | 433 | struct snd_soc_codec *codec = socdev->card->codec; |
434 | u16 clk = uda1380_read_reg_cache(codec, UDA1380_CLK); | 434 | u16 clk = uda1380_read_reg_cache(codec, UDA1380_CLK); |
435 | 435 | ||
436 | /* set WSPLL power and divider if running from this clock */ | 436 | /* set WSPLL power and divider if running from this clock */ |
@@ -469,7 +469,7 @@ static void uda1380_pcm_shutdown(struct snd_pcm_substream *substream, | |||
469 | { | 469 | { |
470 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 470 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
471 | struct snd_soc_device *socdev = rtd->socdev; | 471 | struct snd_soc_device *socdev = rtd->socdev; |
472 | struct snd_soc_codec *codec = socdev->codec; | 472 | struct snd_soc_codec *codec = socdev->card->codec; |
473 | u16 clk = uda1380_read_reg_cache(codec, UDA1380_CLK); | 473 | u16 clk = uda1380_read_reg_cache(codec, UDA1380_CLK); |
474 | 474 | ||
475 | /* shut down WSPLL power if running from this clock */ | 475 | /* shut down WSPLL power if running from this clock */ |
@@ -591,7 +591,7 @@ EXPORT_SYMBOL_GPL(uda1380_dai); | |||
591 | static int uda1380_suspend(struct platform_device *pdev, pm_message_t state) | 591 | static int uda1380_suspend(struct platform_device *pdev, pm_message_t state) |
592 | { | 592 | { |
593 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 593 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
594 | struct snd_soc_codec *codec = socdev->codec; | 594 | struct snd_soc_codec *codec = socdev->card->codec; |
595 | 595 | ||
596 | uda1380_set_bias_level(codec, SND_SOC_BIAS_OFF); | 596 | uda1380_set_bias_level(codec, SND_SOC_BIAS_OFF); |
597 | return 0; | 597 | return 0; |
@@ -600,7 +600,7 @@ static int uda1380_suspend(struct platform_device *pdev, pm_message_t state) | |||
600 | static int uda1380_resume(struct platform_device *pdev) | 600 | static int uda1380_resume(struct platform_device *pdev) |
601 | { | 601 | { |
602 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 602 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
603 | struct snd_soc_codec *codec = socdev->codec; | 603 | struct snd_soc_codec *codec = socdev->card->codec; |
604 | int i; | 604 | int i; |
605 | u8 data[2]; | 605 | u8 data[2]; |
606 | u16 *cache = codec->reg_cache; | 606 | u16 *cache = codec->reg_cache; |
@@ -622,7 +622,7 @@ static int uda1380_resume(struct platform_device *pdev) | |||
622 | */ | 622 | */ |
623 | static int uda1380_init(struct snd_soc_device *socdev, int dac_clk) | 623 | static int uda1380_init(struct snd_soc_device *socdev, int dac_clk) |
624 | { | 624 | { |
625 | struct snd_soc_codec *codec = socdev->codec; | 625 | struct snd_soc_codec *codec = socdev->card->codec; |
626 | int ret = 0; | 626 | int ret = 0; |
627 | 627 | ||
628 | codec->name = "UDA1380"; | 628 | codec->name = "UDA1380"; |
@@ -688,7 +688,7 @@ static int uda1380_i2c_probe(struct i2c_client *i2c, | |||
688 | { | 688 | { |
689 | struct snd_soc_device *socdev = uda1380_socdev; | 689 | struct snd_soc_device *socdev = uda1380_socdev; |
690 | struct uda1380_setup_data *setup = socdev->codec_data; | 690 | struct uda1380_setup_data *setup = socdev->codec_data; |
691 | struct snd_soc_codec *codec = socdev->codec; | 691 | struct snd_soc_codec *codec = socdev->card->codec; |
692 | int ret; | 692 | int ret; |
693 | 693 | ||
694 | i2c_set_clientdata(i2c, codec); | 694 | i2c_set_clientdata(i2c, codec); |
@@ -779,7 +779,7 @@ static int uda1380_probe(struct platform_device *pdev) | |||
779 | if (codec == NULL) | 779 | if (codec == NULL) |
780 | return -ENOMEM; | 780 | return -ENOMEM; |
781 | 781 | ||
782 | socdev->codec = codec; | 782 | socdev->card->codec = codec; |
783 | mutex_init(&codec->mutex); | 783 | mutex_init(&codec->mutex); |
784 | INIT_LIST_HEAD(&codec->dapm_widgets); | 784 | INIT_LIST_HEAD(&codec->dapm_widgets); |
785 | INIT_LIST_HEAD(&codec->dapm_paths); | 785 | INIT_LIST_HEAD(&codec->dapm_paths); |
@@ -803,7 +803,7 @@ static int uda1380_probe(struct platform_device *pdev) | |||
803 | static int uda1380_remove(struct platform_device *pdev) | 803 | static int uda1380_remove(struct platform_device *pdev) |
804 | { | 804 | { |
805 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 805 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
806 | struct snd_soc_codec *codec = socdev->codec; | 806 | struct snd_soc_codec *codec = socdev->card->codec; |
807 | 807 | ||
808 | if (codec->control_data) | 808 | if (codec->control_data) |
809 | uda1380_set_bias_level(codec, SND_SOC_BIAS_OFF); | 809 | uda1380_set_bias_level(codec, SND_SOC_BIAS_OFF); |