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/wm9713.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/wm9713.c')
-rw-r--r-- | sound/soc/codecs/wm9713.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 2fca514fde58..34e0c91092fa 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
@@ -764,7 +764,7 @@ static void pll_factors(struct _pll_div *pll_div, unsigned int source) | |||
764 | static int wm9713_set_pll(struct snd_soc_codec *codec, | 764 | static int wm9713_set_pll(struct snd_soc_codec *codec, |
765 | int pll_id, unsigned int freq_in, unsigned int freq_out) | 765 | int pll_id, unsigned int freq_in, unsigned int freq_out) |
766 | { | 766 | { |
767 | struct wm9713_priv *wm9713 = codec->private_data; | 767 | struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); |
768 | u16 reg, reg2; | 768 | u16 reg, reg2; |
769 | struct _pll_div pll_div; | 769 | struct _pll_div pll_div; |
770 | 770 | ||
@@ -1175,7 +1175,7 @@ static int wm9713_soc_resume(struct platform_device *pdev) | |||
1175 | { | 1175 | { |
1176 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1176 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1177 | struct snd_soc_codec *codec = socdev->card->codec; | 1177 | struct snd_soc_codec *codec = socdev->card->codec; |
1178 | struct wm9713_priv *wm9713 = codec->private_data; | 1178 | struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); |
1179 | int i, ret; | 1179 | int i, ret; |
1180 | u16 *cache = codec->reg_cache; | 1180 | u16 *cache = codec->reg_cache; |
1181 | 1181 | ||
@@ -1201,9 +1201,6 @@ static int wm9713_soc_resume(struct platform_device *pdev) | |||
1201 | } | 1201 | } |
1202 | } | 1202 | } |
1203 | 1203 | ||
1204 | if (codec->suspend_bias_level == SND_SOC_BIAS_ON) | ||
1205 | wm9713_set_bias_level(codec, SND_SOC_BIAS_ON); | ||
1206 | |||
1207 | return ret; | 1204 | return ret; |
1208 | } | 1205 | } |
1209 | 1206 | ||
@@ -1228,8 +1225,9 @@ static int wm9713_soc_probe(struct platform_device *pdev) | |||
1228 | codec->reg_cache_size = sizeof(wm9713_reg); | 1225 | codec->reg_cache_size = sizeof(wm9713_reg); |
1229 | codec->reg_cache_step = 2; | 1226 | codec->reg_cache_step = 2; |
1230 | 1227 | ||
1231 | codec->private_data = kzalloc(sizeof(struct wm9713_priv), GFP_KERNEL); | 1228 | snd_soc_codec_set_drvdata(codec, kzalloc(sizeof(struct wm9713_priv), |
1232 | if (codec->private_data == NULL) { | 1229 | GFP_KERNEL)); |
1230 | if (snd_soc_codec_get_drvdata(codec) == NULL) { | ||
1233 | ret = -ENOMEM; | 1231 | ret = -ENOMEM; |
1234 | goto priv_err; | 1232 | goto priv_err; |
1235 | } | 1233 | } |
@@ -1280,7 +1278,7 @@ pcm_err: | |||
1280 | snd_soc_free_ac97_codec(codec); | 1278 | snd_soc_free_ac97_codec(codec); |
1281 | 1279 | ||
1282 | codec_err: | 1280 | codec_err: |
1283 | kfree(codec->private_data); | 1281 | kfree(snd_soc_codec_get_drvdata(codec)); |
1284 | 1282 | ||
1285 | priv_err: | 1283 | priv_err: |
1286 | kfree(codec->reg_cache); | 1284 | kfree(codec->reg_cache); |
@@ -1302,7 +1300,7 @@ static int wm9713_soc_remove(struct platform_device *pdev) | |||
1302 | snd_soc_dapm_free(socdev); | 1300 | snd_soc_dapm_free(socdev); |
1303 | snd_soc_free_pcms(socdev); | 1301 | snd_soc_free_pcms(socdev); |
1304 | snd_soc_free_ac97_codec(codec); | 1302 | snd_soc_free_ac97_codec(codec); |
1305 | kfree(codec->private_data); | 1303 | kfree(snd_soc_codec_get_drvdata(codec)); |
1306 | kfree(codec->reg_cache); | 1304 | kfree(codec->reg_cache); |
1307 | kfree(codec); | 1305 | kfree(codec); |
1308 | return 0; | 1306 | return 0; |