diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-01-28 21:42:37 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-12 06:45:12 -0500 |
commit | 540b925af4c0456adf220dea991d91bf05ad77c0 (patch) | |
tree | f59a5534aba3d27a941db02570f4f97fa9f767af | |
parent | 2ee178dbeb3974676b23751d602f79cc276f46e4 (diff) |
ASoC: bcm: cygnus: replace platform to component
Now platform can be replaced to component, let's do it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/bcm/cygnus-pcm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/bcm/cygnus-pcm.c b/sound/soc/bcm/cygnus-pcm.c index d616e096462e..123ecf5479d7 100644 --- a/sound/soc/bcm/cygnus-pcm.c +++ b/sound/soc/bcm/cygnus-pcm.c | |||
@@ -820,7 +820,7 @@ static int cygnus_dma_new(struct snd_soc_pcm_runtime *rtd) | |||
820 | return 0; | 820 | return 0; |
821 | } | 821 | } |
822 | 822 | ||
823 | static struct snd_soc_platform_driver cygnus_soc_platform = { | 823 | static struct snd_soc_component_driver cygnus_soc_platform = { |
824 | .ops = &cygnus_pcm_ops, | 824 | .ops = &cygnus_pcm_ops, |
825 | .pcm_new = cygnus_dma_new, | 825 | .pcm_new = cygnus_dma_new, |
826 | .pcm_free = cygnus_dma_free_dma_buffers, | 826 | .pcm_free = cygnus_dma_free_dma_buffers, |
@@ -840,7 +840,8 @@ int cygnus_soc_platform_register(struct device *dev, | |||
840 | return rc; | 840 | return rc; |
841 | } | 841 | } |
842 | 842 | ||
843 | rc = snd_soc_register_platform(dev, &cygnus_soc_platform); | 843 | rc = devm_snd_soc_register_component(dev, &cygnus_soc_platform, |
844 | NULL, 0); | ||
844 | if (rc) { | 845 | if (rc) { |
845 | dev_err(dev, "%s failed\n", __func__); | 846 | dev_err(dev, "%s failed\n", __func__); |
846 | return rc; | 847 | return rc; |
@@ -851,8 +852,6 @@ int cygnus_soc_platform_register(struct device *dev, | |||
851 | 852 | ||
852 | int cygnus_soc_platform_unregister(struct device *dev) | 853 | int cygnus_soc_platform_unregister(struct device *dev) |
853 | { | 854 | { |
854 | snd_soc_unregister_platform(dev); | ||
855 | |||
856 | return 0; | 855 | return 0; |
857 | } | 856 | } |
858 | 857 | ||