diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-01-28 21:50:54 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-12 06:45:36 -0500 |
commit | 781a9fcccae535d3f46cd05177366c7e67aa01ef (patch) | |
tree | f40d2aa210515f46c2fdcc0c4280a3ee7188ce20 | |
parent | abf33c7a536f97b78cce6d016768af2253810a15 (diff) |
ASoC: au1x: dma: 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/au1x/dma.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c index 19457e2b351e..efff1e293a1b 100644 --- a/sound/soc/au1x/dma.c +++ b/sound/soc/au1x/dma.c | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #include "psc.h" | 22 | #include "psc.h" |
23 | 23 | ||
24 | #define DRV_NAME "au1x_dma" | ||
25 | |||
24 | struct pcm_period { | 26 | struct pcm_period { |
25 | u32 start; | 27 | u32 start; |
26 | u32 relative_end; /* relative to start of buffer */ | 28 | u32 relative_end; /* relative to start of buffer */ |
@@ -174,7 +176,8 @@ static const struct snd_pcm_hardware alchemy_pcm_hardware = { | |||
174 | static inline struct alchemy_pcm_ctx *ss_to_ctx(struct snd_pcm_substream *ss) | 176 | static inline struct alchemy_pcm_ctx *ss_to_ctx(struct snd_pcm_substream *ss) |
175 | { | 177 | { |
176 | struct snd_soc_pcm_runtime *rtd = ss->private_data; | 178 | struct snd_soc_pcm_runtime *rtd = ss->private_data; |
177 | return snd_soc_platform_get_drvdata(rtd->platform); | 179 | struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); |
180 | return snd_soc_component_get_drvdata(component); | ||
178 | } | 181 | } |
179 | 182 | ||
180 | static inline struct audio_stream *ss_to_as(struct snd_pcm_substream *ss) | 183 | static inline struct audio_stream *ss_to_as(struct snd_pcm_substream *ss) |
@@ -297,7 +300,8 @@ static int alchemy_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
297 | return 0; | 300 | return 0; |
298 | } | 301 | } |
299 | 302 | ||
300 | static struct snd_soc_platform_driver alchemy_pcm_soc_platform = { | 303 | static struct snd_soc_component_driver alchemy_pcm_soc_component = { |
304 | .name = DRV_NAME, | ||
301 | .ops = &alchemy_pcm_ops, | 305 | .ops = &alchemy_pcm_ops, |
302 | .pcm_new = alchemy_pcm_new, | 306 | .pcm_new = alchemy_pcm_new, |
303 | }; | 307 | }; |
@@ -312,8 +316,8 @@ static int alchemy_pcm_drvprobe(struct platform_device *pdev) | |||
312 | 316 | ||
313 | platform_set_drvdata(pdev, ctx); | 317 | platform_set_drvdata(pdev, ctx); |
314 | 318 | ||
315 | return devm_snd_soc_register_platform(&pdev->dev, | 319 | return devm_snd_soc_register_component(&pdev->dev, |
316 | &alchemy_pcm_soc_platform); | 320 | &alchemy_pcm_soc_component, NULL, 0); |
317 | } | 321 | } |
318 | 322 | ||
319 | static struct platform_driver alchemy_pcmdma_driver = { | 323 | static struct platform_driver alchemy_pcmdma_driver = { |