| Index: sound/soc/samsung/smdk_spdif.c
|
| diff --git a/sound/soc/s3c24xx/smdk_spdif.c b/sound/soc/samsung/smdk_spdif.c
|
| similarity index 93%
|
| rename from sound/soc/s3c24xx/smdk_spdif.c
|
| rename to sound/soc/samsung/smdk_spdif.c
|
| index c8bd90488a87385d33b168813878893bfa5b9266..e8ac961c6ba10140fa62768d8f6c3c29c0c15128 100644
|
| --- a/sound/soc/s3c24xx/smdk_spdif.c
|
| +++ b/sound/soc/samsung/smdk_spdif.c
|
| @@ -10,15 +10,10 @@
|
| *
|
| */
|
|
|
| -#include <linux/module.h>
|
| -#include <linux/device.h>
|
| #include <linux/clk.h>
|
|
|
| -#include <plat/devs.h>
|
| -
|
| #include <sound/soc.h>
|
|
|
| -#include "s3c-dma.h"
|
| #include "spdif.h"
|
|
|
| /* Audio clock settings are belonged to board specific part. Every
|
| @@ -28,7 +23,7 @@
|
| static int set_audio_clock_heirachy(struct platform_device *pdev)
|
| {
|
| struct clk *fout_epll, *mout_epll, *sclk_audio0, *sclk_spdif;
|
| - int ret;
|
| + int ret = 0;
|
|
|
| fout_epll = clk_get(NULL, "fout_epll");
|
| if (IS_ERR(fout_epll)) {
|
| @@ -61,7 +56,7 @@ static int set_audio_clock_heirachy(struct platform_device *pdev)
|
| goto out3;
|
| }
|
|
|
| - /* Set audio clock heirachy for S/PDIF */
|
| + /* Set audio clock hierarchy for S/PDIF */
|
| clk_set_parent(mout_epll, fout_epll);
|
| clk_set_parent(sclk_audio0, mout_epll);
|
| clk_set_parent(sclk_spdif, sclk_audio0);
|
| @@ -79,7 +74,7 @@ out1:
|
|
|
| /* We should haved to set clock directly on this part because of clock
|
| * scheme of Samsudng SoCs did not support to set rates from abstrct
|
| - * clock of it's heirachy.
|
| + * clock of it's hierarchy.
|
| */
|
| static int set_audio_clock_rate(unsigned long epll_rate,
|
| unsigned long audio_rate)
|
| @@ -152,12 +147,10 @@ static struct snd_soc_ops smdk_spdif_ops = {
|
| .hw_params = smdk_hw_params,
|
| };
|
|
|
| -static struct snd_soc_card smdk;
|
| -
|
| static struct snd_soc_dai_link smdk_dai = {
|
| .name = "S/PDIF",
|
| .stream_name = "S/PDIF PCM Playback",
|
| - .platform_name = "s3c24xx-pcm-audio",
|
| + .platform_name = "samsung-audio",
|
| .cpu_dai_name = "samsung-spdif",
|
| .codec_dai_name = "dit-hifi",
|
| .codec_name = "spdif-dit",
|
| @@ -183,7 +176,7 @@ static int __init smdk_init(void)
|
|
|
| ret = platform_device_add(smdk_snd_spdif_dit_device);
|
| if (ret)
|
| - goto err2;
|
| + goto err1;
|
|
|
| smdk_snd_spdif_device = platform_device_alloc("soc-audio", -1);
|
| if (!smdk_snd_spdif_device) {
|
| @@ -195,17 +188,21 @@ static int __init smdk_init(void)
|
|
|
| ret = platform_device_add(smdk_snd_spdif_device);
|
| if (ret)
|
| - goto err1;
|
| + goto err3;
|
|
|
| - /* Set audio clock heirachy manually */
|
| + /* Set audio clock hierarchy manually */
|
| ret = set_audio_clock_heirachy(smdk_snd_spdif_device);
|
| if (ret)
|
| - goto err1;
|
| + goto err4;
|
|
|
| return 0;
|
| -err1:
|
| +err4:
|
| + platform_device_del(smdk_snd_spdif_device);
|
| +err3:
|
| platform_device_put(smdk_snd_spdif_device);
|
| err2:
|
| + platform_device_del(smdk_snd_spdif_dit_device);
|
| +err1:
|
| platform_device_put(smdk_snd_spdif_dit_device);
|
| return ret;
|
| }
|
| @@ -213,6 +210,7 @@ err2:
|
| static void __exit smdk_exit(void)
|
| {
|
| platform_device_unregister(smdk_snd_spdif_device);
|
| + platform_device_unregister(smdk_snd_spdif_dit_device);
|
| }
|
|
|
| module_init(smdk_init);
|
|
|