From patchwork Mon Feb 12 12:30:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 128004 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3164898ljc; Mon, 12 Feb 2018 04:34:20 -0800 (PST) X-Google-Smtp-Source: AH8x227liE8dbMS5jyILDcPaCLTPHBoENj2/9bRGgTerwy8mQb/Gkr8Qsk07GQSOCBWPAJ8rscxy X-Received: by 10.28.130.84 with SMTP id e81mr3283494wmd.15.1518438860092; Mon, 12 Feb 2018 04:34:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518438860; cv=none; d=google.com; s=arc-20160816; b=amOIOKy0tFFHdl7b4q7z8ZkVr0QZ9g4yeIhlPn/U5pUnp09k2VoGboZgYx9SnOdy4C umFREFdLgCeCYZtpnj8JXqneq0qZqplHobzBBQHFsnANn4VDPbC0aas/gZ2RDgCAZzJC fK7Pq0pK0LAlXFqQbV+Jhjq7eO/zawzEkW8J7Qs73VgqzAgjgzBq5cGOE5Sgpz9y57cF WCZr2MFe/vzVd3W76OEDKOSAKPZMpu7hi+PC4yeTrHgepwGPqtuCZbp6c76TVJRLXbPl gF/QYYPGWx9owp6HW0ilfP7zEqt5w+aM/RY9yroruYdpvDbwr5ImxempNoWdWNXbDkRi vzgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=xwyzpqf6U1l3rDe8dUuzW7noJBIafmNIs2yf3KBEprg=; b=riFn389VlDogkQIzmo7yHbISNPHyZ374bnr0V9HwBEl+SNVrTaJbiEdhcgIaX1GXJ7 SsX2FnpPdtek4YHoPJ7id7AduW1goBt3do4nsqLCjaTU+XfdcdTXQAVcGDC7VqGMDPuv Z1doDV5+3tktgf3OCj6BUTZKfE3iLjMJp4Mo0OD8nsfiGtK2f6X7zSbMFmU3j1fvwAjf DzB/9zjc1iboIl8tTIPMwmAb8abatO8T8aes7ak6hpl70uVICnxPSxVdwxZOfzMV+BJU +KN2V2YQMFomiV6B+yiFpHB7uo/XtEVUaeorAJIOv0kLJYbhgHqnSL3OXtPw3glCJyuL Zw2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=RyoshCrC; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id f5si3562684wmg.258.2018.02.12.04.34.19; Mon, 12 Feb 2018 04:34:20 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=RyoshCrC; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A6EA4267910; Mon, 12 Feb 2018 13:32:55 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 44F4426790E; Mon, 12 Feb 2018 13:32:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 6FFED26753E for ; Mon, 12 Feb 2018 13:30:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=740DGxOQYktxWQ8uvXZeZblYI5LQSdARg7viOcIvDrM=; b=RyoshCrCTsDA XLKj3VgPZn/S4Ssqku7xLIv5YMKENp36M5upRw3PBjH3xHrKIVh71WDCfumg7ceF4mVScSsCc6+WV N8k8PKTSoRE5zirPyk/vuIGwY0aaMruXWWrJ2YfvvAN+egwp5mDnPpEAcIzlYc2lkEr3EC86OKCMM 6vlvQ=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1elDFa-00020t-Mx; Mon, 12 Feb 2018 12:30:26 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1elDFa-0003ED-8R; Mon, 12 Feb 2018 12:30:26 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <878td3gazl.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Mon, 12 Feb 2018 12:30:26 +0000 Cc: alsa-devel@alsa-project.org, Mark Brown , Simon Subject: [alsa-devel] Applied "ASoC: rt5514-spi: replace platform to component" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: rt5514-spi: replace platform to component has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 9fe3b2bac02c6d06724d526b0245568bca49349f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 29 Jan 2018 02:45:13 +0000 Subject: [PATCH] ASoC: rt5514-spi: replace platform to component Now platform can be replaced to component, let's do it. This patch merges rt5514_spi_dai_component into rt5514_spi_component Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5514-spi.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) -- 2.16.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c index 2144edca97b0..84184d90385b 100644 --- a/sound/soc/codecs/rt5514-spi.c +++ b/sound/soc/codecs/rt5514-spi.c @@ -35,6 +35,8 @@ #include "rt5514-spi.h" +#define DRV_NAME "rt5514-spi" + static struct spi_device *rt5514_spi; struct rt5514_dsp { @@ -211,8 +213,9 @@ static int rt5514_spi_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); struct rt5514_dsp *rt5514_dsp = - snd_soc_platform_get_drvdata(rtd->platform); + snd_soc_component_get_drvdata(component); int ret; u8 buf[8]; @@ -235,8 +238,9 @@ static int rt5514_spi_hw_params(struct snd_pcm_substream *substream, static int rt5514_spi_hw_free(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); struct rt5514_dsp *rt5514_dsp = - snd_soc_platform_get_drvdata(rtd->platform); + snd_soc_component_get_drvdata(component); mutex_lock(&rt5514_dsp->dma_lock); rt5514_dsp->substream = NULL; @@ -252,8 +256,9 @@ static snd_pcm_uframes_t rt5514_spi_pcm_pointer( { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); struct rt5514_dsp *rt5514_dsp = - snd_soc_platform_get_drvdata(rtd->platform); + snd_soc_component_get_drvdata(component); return bytes_to_frames(runtime, rt5514_dsp->dma_offset); } @@ -267,18 +272,18 @@ static const struct snd_pcm_ops rt5514_spi_pcm_ops = { .page = snd_pcm_lib_get_vmalloc_page, }; -static int rt5514_spi_pcm_probe(struct snd_soc_platform *platform) +static int rt5514_spi_pcm_probe(struct snd_soc_component *component) { struct rt5514_dsp *rt5514_dsp; int ret; - rt5514_dsp = devm_kzalloc(platform->dev, sizeof(*rt5514_dsp), + rt5514_dsp = devm_kzalloc(component->dev, sizeof(*rt5514_dsp), GFP_KERNEL); rt5514_dsp->dev = &rt5514_spi->dev; mutex_init(&rt5514_dsp->dma_lock); INIT_DELAYED_WORK(&rt5514_dsp->copy_work, rt5514_spi_copy_work); - snd_soc_platform_set_drvdata(platform, rt5514_dsp); + snd_soc_component_set_drvdata(component, rt5514_dsp); if (rt5514_spi->irq) { ret = devm_request_threaded_irq(&rt5514_spi->dev, @@ -296,15 +301,12 @@ static int rt5514_spi_pcm_probe(struct snd_soc_platform *platform) return 0; } -static const struct snd_soc_platform_driver rt5514_spi_platform = { +static const struct snd_soc_component_driver rt5514_spi_component = { + .name = DRV_NAME, .probe = rt5514_spi_pcm_probe, .ops = &rt5514_spi_pcm_ops, }; -static const struct snd_soc_component_driver rt5514_spi_dai_component = { - .name = "rt5514-spi-dai", -}; - /** * rt5514_spi_burst_read - Read data from SPI by rt5514 address. * @addr: Start address. @@ -445,14 +447,8 @@ static int rt5514_spi_probe(struct spi_device *spi) rt5514_spi = spi; - ret = devm_snd_soc_register_platform(&spi->dev, &rt5514_spi_platform); - if (ret < 0) { - dev_err(&spi->dev, "Failed to register platform.\n"); - return ret; - } - ret = devm_snd_soc_register_component(&spi->dev, - &rt5514_spi_dai_component, + &rt5514_spi_component, &rt5514_spi_dai, 1); if (ret < 0) { dev_err(&spi->dev, "Failed to register component.\n");