diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-01-28 21:50:37 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-12 06:45:35 -0500 |
commit | abf33c7a536f97b78cce6d016768af2253810a15 (patch) | |
tree | 35cbbb06ca9dd5ebea11883050130c35c231f737 /sound/soc/au1x | |
parent | 703c13e447f84a7ed8315938719540ea05ad5045 (diff) |
ASoC: au1x: dbdma2: 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>
Diffstat (limited to 'sound/soc/au1x')
-rw-r--r-- | sound/soc/au1x/dbdma2.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index 6a035ca0f521..fb650659c3a3 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | /*#define PCM_DEBUG*/ | 33 | /*#define PCM_DEBUG*/ |
34 | 34 | ||
35 | #define DRV_NAME "dbdma2" | ||
36 | |||
35 | #define MSG(x...) printk(KERN_INFO "au1xpsc_pcm: " x) | 37 | #define MSG(x...) printk(KERN_INFO "au1xpsc_pcm: " x) |
36 | #ifdef PCM_DEBUG | 38 | #ifdef PCM_DEBUG |
37 | #define DBG MSG | 39 | #define DBG MSG |
@@ -187,8 +189,8 @@ out: | |||
187 | static inline struct au1xpsc_audio_dmadata *to_dmadata(struct snd_pcm_substream *ss) | 189 | static inline struct au1xpsc_audio_dmadata *to_dmadata(struct snd_pcm_substream *ss) |
188 | { | 190 | { |
189 | struct snd_soc_pcm_runtime *rtd = ss->private_data; | 191 | struct snd_soc_pcm_runtime *rtd = ss->private_data; |
190 | struct au1xpsc_audio_dmadata *pcd = | 192 | struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); |
191 | snd_soc_platform_get_drvdata(rtd->platform); | 193 | struct au1xpsc_audio_dmadata *pcd = snd_soc_component_get_drvdata(component); |
192 | return &pcd[ss->stream]; | 194 | return &pcd[ss->stream]; |
193 | } | 195 | } |
194 | 196 | ||
@@ -327,7 +329,8 @@ static int au1xpsc_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
327 | } | 329 | } |
328 | 330 | ||
329 | /* au1xpsc audio platform */ | 331 | /* au1xpsc audio platform */ |
330 | static struct snd_soc_platform_driver au1xpsc_soc_platform = { | 332 | static struct snd_soc_component_driver au1xpsc_soc_component = { |
333 | .name = DRV_NAME, | ||
331 | .ops = &au1xpsc_pcm_ops, | 334 | .ops = &au1xpsc_pcm_ops, |
332 | .pcm_new = au1xpsc_pcm_new, | 335 | .pcm_new = au1xpsc_pcm_new, |
333 | }; | 336 | }; |
@@ -344,8 +347,8 @@ static int au1xpsc_pcm_drvprobe(struct platform_device *pdev) | |||
344 | 347 | ||
345 | platform_set_drvdata(pdev, dmadata); | 348 | platform_set_drvdata(pdev, dmadata); |
346 | 349 | ||
347 | return devm_snd_soc_register_platform(&pdev->dev, | 350 | return devm_snd_soc_register_component(&pdev->dev, |
348 | &au1xpsc_soc_platform); | 351 | &au1xpsc_soc_component, NULL, 0); |
349 | } | 352 | } |
350 | 353 | ||
351 | static struct platform_driver au1xpsc_pcm_driver = { | 354 | static struct platform_driver au1xpsc_pcm_driver = { |