From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH v2 35/39] ASoC: au1x: dma: replace platform to component Date: Mon, 29 Jan 2018 02:50:54 +0000 Message-ID: <87po5t5qh5.wl%kuninori.morimoto.gx@renesas.com> References: <87607l8k9i.wl%kuninori.morimoto.gx@renesas.com> <874ln58k4s.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from relmlie3.idc.renesas.com (relmlor4.renesas.com [210.160.252.174]) by alsa0.perex.cz (Postfix) with ESMTP id 044822676CC for ; Mon, 29 Jan 2018 03:50:57 +0100 (CET) In-Reply-To: <874ln58k4s.wl%kuninori.morimoto.gx@renesas.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: Linux-ALSA List-Id: alsa-devel@alsa-project.org From: Kuninori Morimoto Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto --- sound/soc/au1x/dma.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c index 19457e2..efff1e2 100644 --- a/sound/soc/au1x/dma.c +++ b/sound/soc/au1x/dma.c @@ -21,6 +21,8 @@ #include "psc.h" +#define DRV_NAME "au1x_dma" + struct pcm_period { u32 start; u32 relative_end; /* relative to start of buffer */ @@ -174,7 +176,8 @@ static irqreturn_t au1000_dma_interrupt(int irq, void *ptr) static inline struct alchemy_pcm_ctx *ss_to_ctx(struct snd_pcm_substream *ss) { 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) @@ -297,7 +300,8 @@ static int alchemy_pcm_new(struct snd_soc_pcm_runtime *rtd) 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, .pcm_new = alchemy_pcm_new, }; @@ -312,8 +316,8 @@ static int alchemy_pcm_drvprobe(struct platform_device *pdev) platform_set_drvdata(pdev, ctx); - return devm_snd_soc_register_platform(&pdev->dev, - &alchemy_pcm_soc_platform); + return devm_snd_soc_register_component(&pdev->dev, + &alchemy_pcm_soc_component, NULL, 0); } static struct platform_driver alchemy_pcmdma_driver = { -- 1.9.1