aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2014-01-05 02:38:34 -0500
committerMark Brown <broonie@linaro.org>2014-01-06 10:37:43 -0500
commit2b32098f74ad6e8e3c0dbc714aa0f14c2f7df20a (patch)
tree80b9fd084fc89480fd0b9dcf058d6e08bbac8603 /sound/soc/codecs
parent295b84237b4ec2e1f148c8f6d7f59a7d06fda624 (diff)
ASoC: mc13783: trivial: Cleanup module
This is a trivial cleanup: remove useless variable mc13xxx and extra spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/mc13783.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 997f708afc79..582c2bbd42cb 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -752,20 +752,14 @@ static struct snd_soc_codec_driver soc_codec_dev_mc13783 = {
752 752
753static int __init mc13783_codec_probe(struct platform_device *pdev) 753static int __init mc13783_codec_probe(struct platform_device *pdev)
754{ 754{
755 struct mc13xxx *mc13xxx;
756 struct mc13783_priv *priv; 755 struct mc13783_priv *priv;
757 struct mc13xxx_codec_platform_data *pdata = pdev->dev.platform_data; 756 struct mc13xxx_codec_platform_data *pdata = pdev->dev.platform_data;
758 int ret; 757 int ret;
759 758
760 mc13xxx = dev_get_drvdata(pdev->dev.parent);
761
762
763 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 759 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
764 if (priv == NULL) 760 if (!priv)
765 return -ENOMEM; 761 return -ENOMEM;
766 762
767 dev_set_drvdata(&pdev->dev, priv);
768 priv->mc13xxx = mc13xxx;
769 if (pdata) { 763 if (pdata) {
770 priv->adc_ssi_port = pdata->adc_ssi_port; 764 priv->adc_ssi_port = pdata->adc_ssi_port;
771 priv->dac_ssi_port = pdata->dac_ssi_port; 765 priv->dac_ssi_port = pdata->dac_ssi_port;
@@ -773,6 +767,9 @@ static int __init mc13783_codec_probe(struct platform_device *pdev)
773 return -ENOSYS; 767 return -ENOSYS;
774 } 768 }
775 769
770 dev_set_drvdata(&pdev->dev, priv);
771 priv->mc13xxx = dev_get_drvdata(pdev->dev.parent);
772
776 if (priv->adc_ssi_port == priv->dac_ssi_port) 773 if (priv->adc_ssi_port == priv->dac_ssi_port)
777 ret = snd_soc_register_codec(&pdev->dev, &soc_codec_dev_mc13783, 774 ret = snd_soc_register_codec(&pdev->dev, &soc_codec_dev_mc13783,
778 mc13783_dai_sync, ARRAY_SIZE(mc13783_dai_sync)); 775 mc13783_dai_sync, ARRAY_SIZE(mc13783_dai_sync));
@@ -792,9 +789,9 @@ static int mc13783_codec_remove(struct platform_device *pdev)
792 789
793static struct platform_driver mc13783_codec_driver = { 790static struct platform_driver mc13783_codec_driver = {
794 .driver = { 791 .driver = {
795 .name = "mc13783-codec", 792 .name = "mc13783-codec",
796 .owner = THIS_MODULE, 793 .owner = THIS_MODULE,
797 }, 794 },
798 .remove = mc13783_codec_remove, 795 .remove = mc13783_codec_remove,
799}; 796};
800module_platform_driver_probe(mc13783_codec_driver, mc13783_codec_probe); 797module_platform_driver_probe(mc13783_codec_driver, mc13783_codec_probe);