Commit 797d1697 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: pxa: mmp: replace platform to component

Now platform can be replaced to component, let's do it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f98fc0f8
......@@ -25,6 +25,8 @@
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h>
#define DRV_NAME "mmp-pcm"
struct mmp_dma_data {
int ssp_id;
struct resource *dma_res;
......@@ -100,7 +102,8 @@ static bool filter(struct dma_chan *chan, void *param)
static int mmp_pcm_open(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct platform_device *pdev = to_platform_device(rtd->platform->dev);
struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
struct platform_device *pdev = to_platform_device(component->dev);
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
struct mmp_dma_data dma_data;
struct resource *r;
......@@ -211,7 +214,8 @@ static int mmp_pcm_new(struct snd_soc_pcm_runtime *rtd)
return ret;
}
static const struct snd_soc_platform_driver mmp_soc_platform = {
static const struct snd_soc_component_driver mmp_soc_component = {
.name = DRV_NAME,
.ops = &mmp_pcm_ops,
.pcm_new = mmp_pcm_new,
.pcm_free = mmp_pcm_free_dma_buffers,
......@@ -231,7 +235,8 @@ static int mmp_pcm_probe(struct platform_device *pdev)
mmp_pcm_hardware[SNDRV_PCM_STREAM_CAPTURE].period_bytes_max =
pdata->period_max_capture;
}
return devm_snd_soc_register_platform(&pdev->dev, &mmp_soc_platform);
return devm_snd_soc_register_component(&pdev->dev, &mmp_soc_component,
NULL, 0);
}
static struct platform_driver mmp_pcm_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment