Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 781a9fcc authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: au1x: dma: 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 abf33c7a
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -21,6 +21,8 @@


#include "psc.h"
#include "psc.h"


#define DRV_NAME "au1x_dma"

struct pcm_period {
struct pcm_period {
	u32 start;
	u32 start;
	u32 relative_end;	/* relative to start of buffer */
	u32 relative_end;	/* relative to start of buffer */
@@ -174,7 +176,8 @@ static const struct snd_pcm_hardware alchemy_pcm_hardware = {
static inline struct alchemy_pcm_ctx *ss_to_ctx(struct snd_pcm_substream *ss)
static inline struct alchemy_pcm_ctx *ss_to_ctx(struct snd_pcm_substream *ss)
{
{
	struct snd_soc_pcm_runtime *rtd = ss->private_data;
	struct snd_soc_pcm_runtime *rtd = ss->private_data;
	return snd_soc_platform_get_drvdata(rtd->platform);
	struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
	return snd_soc_component_get_drvdata(component);
}
}


static inline struct audio_stream *ss_to_as(struct snd_pcm_substream *ss)
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)
	return 0;
	return 0;
}
}


static struct snd_soc_platform_driver alchemy_pcm_soc_platform = {
static struct snd_soc_component_driver alchemy_pcm_soc_component = {
	.name		= DRV_NAME,
	.ops		= &alchemy_pcm_ops,
	.ops		= &alchemy_pcm_ops,
	.pcm_new	= alchemy_pcm_new,
	.pcm_new	= alchemy_pcm_new,
};
};
@@ -312,8 +316,8 @@ static int alchemy_pcm_drvprobe(struct platform_device *pdev)


	platform_set_drvdata(pdev, ctx);
	platform_set_drvdata(pdev, ctx);


	return devm_snd_soc_register_platform(&pdev->dev,
	return devm_snd_soc_register_component(&pdev->dev,
					      &alchemy_pcm_soc_platform);
					&alchemy_pcm_soc_component, NULL, 0);
}
}


static struct platform_driver alchemy_pcmdma_driver = {
static struct platform_driver alchemy_pcmdma_driver = {