diff options
Diffstat (limited to 'sound/soc/codecs/uda134x.c')
-rw-r--r-- | sound/soc/codecs/uda134x.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c index 3e99fe5131dd..20deaca8e107 100644 --- a/sound/soc/codecs/uda134x.c +++ b/sound/soc/codecs/uda134x.c | |||
@@ -174,7 +174,7 @@ static int uda134x_startup(struct snd_pcm_substream *substream, | |||
174 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 174 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
175 | struct snd_soc_device *socdev = rtd->socdev; | 175 | struct snd_soc_device *socdev = rtd->socdev; |
176 | struct snd_soc_codec *codec = socdev->card->codec; | 176 | struct snd_soc_codec *codec = socdev->card->codec; |
177 | struct uda134x_priv *uda134x = codec->private_data; | 177 | struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec); |
178 | struct snd_pcm_runtime *master_runtime; | 178 | struct snd_pcm_runtime *master_runtime; |
179 | 179 | ||
180 | if (uda134x->master_substream) { | 180 | if (uda134x->master_substream) { |
@@ -207,7 +207,7 @@ static void uda134x_shutdown(struct snd_pcm_substream *substream, | |||
207 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 207 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
208 | struct snd_soc_device *socdev = rtd->socdev; | 208 | struct snd_soc_device *socdev = rtd->socdev; |
209 | struct snd_soc_codec *codec = socdev->card->codec; | 209 | struct snd_soc_codec *codec = socdev->card->codec; |
210 | struct uda134x_priv *uda134x = codec->private_data; | 210 | struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec); |
211 | 211 | ||
212 | if (uda134x->master_substream == substream) | 212 | if (uda134x->master_substream == substream) |
213 | uda134x->master_substream = uda134x->slave_substream; | 213 | uda134x->master_substream = uda134x->slave_substream; |
@@ -222,7 +222,7 @@ static int uda134x_hw_params(struct snd_pcm_substream *substream, | |||
222 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 222 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
223 | struct snd_soc_device *socdev = rtd->socdev; | 223 | struct snd_soc_device *socdev = rtd->socdev; |
224 | struct snd_soc_codec *codec = socdev->card->codec; | 224 | struct snd_soc_codec *codec = socdev->card->codec; |
225 | struct uda134x_priv *uda134x = codec->private_data; | 225 | struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec); |
226 | u8 hw_params; | 226 | u8 hw_params; |
227 | 227 | ||
228 | if (substream == uda134x->slave_substream) { | 228 | if (substream == uda134x->slave_substream) { |
@@ -294,7 +294,7 @@ static int uda134x_set_dai_sysclk(struct snd_soc_dai *codec_dai, | |||
294 | int clk_id, unsigned int freq, int dir) | 294 | int clk_id, unsigned int freq, int dir) |
295 | { | 295 | { |
296 | struct snd_soc_codec *codec = codec_dai->codec; | 296 | struct snd_soc_codec *codec = codec_dai->codec; |
297 | struct uda134x_priv *uda134x = codec->private_data; | 297 | struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec); |
298 | 298 | ||
299 | pr_debug("%s clk_id: %d, freq: %u, dir: %d\n", __func__, | 299 | pr_debug("%s clk_id: %d, freq: %u, dir: %d\n", __func__, |
300 | clk_id, freq, dir); | 300 | clk_id, freq, dir); |
@@ -316,7 +316,7 @@ static int uda134x_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
316 | unsigned int fmt) | 316 | unsigned int fmt) |
317 | { | 317 | { |
318 | struct snd_soc_codec *codec = codec_dai->codec; | 318 | struct snd_soc_codec *codec = codec_dai->codec; |
319 | struct uda134x_priv *uda134x = codec->private_data; | 319 | struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec); |
320 | 320 | ||
321 | pr_debug("%s fmt: %08X\n", __func__, fmt); | 321 | pr_debug("%s fmt: %08X\n", __func__, fmt); |
322 | 322 | ||
@@ -503,7 +503,7 @@ static int uda134x_soc_probe(struct platform_device *pdev) | |||
503 | uda134x = kzalloc(sizeof(struct uda134x_priv), GFP_KERNEL); | 503 | uda134x = kzalloc(sizeof(struct uda134x_priv), GFP_KERNEL); |
504 | if (uda134x == NULL) | 504 | if (uda134x == NULL) |
505 | goto priv_err; | 505 | goto priv_err; |
506 | codec->private_data = uda134x; | 506 | snd_soc_codec_set_drvdata(codec, uda134x); |
507 | 507 | ||
508 | codec->reg_cache = kmemdup(uda134x_reg, sizeof(uda134x_reg), | 508 | codec->reg_cache = kmemdup(uda134x_reg, sizeof(uda134x_reg), |
509 | GFP_KERNEL); | 509 | GFP_KERNEL); |
@@ -567,7 +567,7 @@ static int uda134x_soc_probe(struct platform_device *pdev) | |||
567 | pcm_err: | 567 | pcm_err: |
568 | kfree(codec->reg_cache); | 568 | kfree(codec->reg_cache); |
569 | reg_err: | 569 | reg_err: |
570 | kfree(codec->private_data); | 570 | kfree(snd_soc_codec_get_drvdata(codec)); |
571 | priv_err: | 571 | priv_err: |
572 | kfree(codec); | 572 | kfree(codec); |
573 | return ret; | 573 | return ret; |
@@ -585,7 +585,7 @@ static int uda134x_soc_remove(struct platform_device *pdev) | |||
585 | snd_soc_free_pcms(socdev); | 585 | snd_soc_free_pcms(socdev); |
586 | snd_soc_dapm_free(socdev); | 586 | snd_soc_dapm_free(socdev); |
587 | 587 | ||
588 | kfree(codec->private_data); | 588 | kfree(snd_soc_codec_get_drvdata(codec)); |
589 | kfree(codec->reg_cache); | 589 | kfree(codec->reg_cache); |
590 | kfree(codec); | 590 | kfree(codec); |
591 | 591 | ||