aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ssm2602.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/ssm2602.c')
-rw-r--r--sound/soc/codecs/ssm2602.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index 942f5dc30801..99ddec7df614 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -277,7 +277,7 @@ static int ssm2602_hw_params(struct snd_pcm_substream *substream,
277 struct snd_soc_pcm_runtime *rtd = substream->private_data; 277 struct snd_soc_pcm_runtime *rtd = substream->private_data;
278 struct snd_soc_device *socdev = rtd->socdev; 278 struct snd_soc_device *socdev = rtd->socdev;
279 struct snd_soc_codec *codec = socdev->card->codec; 279 struct snd_soc_codec *codec = socdev->card->codec;
280 struct ssm2602_priv *ssm2602 = codec->private_data; 280 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
281 struct i2c_client *i2c = codec->control_data; 281 struct i2c_client *i2c = codec->control_data;
282 u16 iface = ssm2602_read_reg_cache(codec, SSM2602_IFACE) & 0xfff3; 282 u16 iface = ssm2602_read_reg_cache(codec, SSM2602_IFACE) & 0xfff3;
283 int i = get_coeff(ssm2602->sysclk, params_rate(params)); 283 int i = get_coeff(ssm2602->sysclk, params_rate(params));
@@ -322,7 +322,7 @@ static int ssm2602_startup(struct snd_pcm_substream *substream,
322 struct snd_soc_pcm_runtime *rtd = substream->private_data; 322 struct snd_soc_pcm_runtime *rtd = substream->private_data;
323 struct snd_soc_device *socdev = rtd->socdev; 323 struct snd_soc_device *socdev = rtd->socdev;
324 struct snd_soc_codec *codec = socdev->card->codec; 324 struct snd_soc_codec *codec = socdev->card->codec;
325 struct ssm2602_priv *ssm2602 = codec->private_data; 325 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
326 struct i2c_client *i2c = codec->control_data; 326 struct i2c_client *i2c = codec->control_data;
327 struct snd_pcm_runtime *master_runtime; 327 struct snd_pcm_runtime *master_runtime;
328 328
@@ -373,7 +373,7 @@ static void ssm2602_shutdown(struct snd_pcm_substream *substream,
373 struct snd_soc_pcm_runtime *rtd = substream->private_data; 373 struct snd_soc_pcm_runtime *rtd = substream->private_data;
374 struct snd_soc_device *socdev = rtd->socdev; 374 struct snd_soc_device *socdev = rtd->socdev;
375 struct snd_soc_codec *codec = socdev->card->codec; 375 struct snd_soc_codec *codec = socdev->card->codec;
376 struct ssm2602_priv *ssm2602 = codec->private_data; 376 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
377 377
378 /* deactivate */ 378 /* deactivate */
379 if (!codec->active) 379 if (!codec->active)
@@ -401,7 +401,7 @@ static int ssm2602_set_dai_sysclk(struct snd_soc_dai *codec_dai,
401 int clk_id, unsigned int freq, int dir) 401 int clk_id, unsigned int freq, int dir)
402{ 402{
403 struct snd_soc_codec *codec = codec_dai->codec; 403 struct snd_soc_codec *codec = codec_dai->codec;
404 struct ssm2602_priv *ssm2602 = codec->private_data; 404 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
405 switch (freq) { 405 switch (freq) {
406 case 11289600: 406 case 11289600:
407 case 12000000: 407 case 12000000:
@@ -726,7 +726,7 @@ static int ssm2602_probe(struct platform_device *pdev)
726 return -ENOMEM; 726 return -ENOMEM;
727 } 727 }
728 728
729 codec->private_data = ssm2602; 729 snd_soc_codec_set_drvdata(codec, ssm2602);
730 socdev->card->codec = codec; 730 socdev->card->codec = codec;
731 mutex_init(&codec->mutex); 731 mutex_init(&codec->mutex);
732 INIT_LIST_HEAD(&codec->dapm_widgets); 732 INIT_LIST_HEAD(&codec->dapm_widgets);
@@ -759,7 +759,7 @@ static int ssm2602_remove(struct platform_device *pdev)
759 i2c_unregister_device(codec->control_data); 759 i2c_unregister_device(codec->control_data);
760 i2c_del_driver(&ssm2602_i2c_driver); 760 i2c_del_driver(&ssm2602_i2c_driver);
761#endif 761#endif
762 kfree(codec->private_data); 762 kfree(snd_soc_codec_get_drvdata(codec));
763 kfree(codec); 763 kfree(codec);
764 764
765 return 0; 765 return 0;