From patchwork Fri Nov 11 08:41:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 624229 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC653C433FE for ; Sat, 12 Nov 2022 14:12:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BB9581654; Sat, 12 Nov 2022 15:11:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BB9581654 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1668262365; bh=FWw2GF4HLLJXUXc/lqJntsC0Snn3Hne/L/wgUOnMD00=; h=Date:From:To:Subject:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=TNramUuphiK9ERFaSoK/5L6OuwG8fRiO4DQjLfKZsUh0WwgG9Ql9VMnIHkjTPwW8a vQjKv4Q3frTJgpU3VXrxoKklu9nZdPThFZEC45SZqbVXigF2Dyj5PIhh2EZcud8B4n nihhdfzxKwos4YN33/FNmkPKV97txkdxOXAu+aAc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7433DF80254; Sat, 12 Nov 2022 15:11:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 88D72F80162; Fri, 11 Nov 2022 09:42:13 +0100 (CET) Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 40F68F80162 for ; Fri, 11 Nov 2022 09:42:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 40F68F80162 Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4N7sdR1xqfz5PkGl; Fri, 11 Nov 2022 16:42:03 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AB8fntW013165; Fri, 11 Nov 2022 16:41:49 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Fri, 11 Nov 2022 16:41:51 +0800 (CST) Date: Fri, 11 Nov 2022 16:41:51 +0800 (CST) X-Zmail-TransId: 2afa636e0acfffffffffc94e740f X-Mailer: Zmail v1.0 Message-ID: <202211111641514826535@zte.com.cn> Mime-Version: 1.0 From: To: Subject: =?utf-8?q?=5BPATCH=5D_ASoC=3A_sunxi=3A_use_devm=5Fplatform=5Fget=5F?= =?utf-8?q?and=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AB8fntW013165 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 636E0ADB.000 by FangMail milter! X-FangMail-Envelope: 1668156123/4N7sdR1xqfz5PkGl/636E0ADB.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 636E0ADB.000/4N7sdR1xqfz5PkGl X-Mailman-Approved-At: Sat, 12 Nov 2022 15:11:54 +0100 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, chi.minghao@zte.com.cn, lgirdwood@gmail.com, broonie@kernel.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Minghao Chi Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Acked-by: Samuel Holland --- sound/soc/sunxi/sun50i-dmic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c index 62509cb02995..069c993acb31 100644 --- a/sound/soc/sunxi/sun50i-dmic.c +++ b/sound/soc/sunxi/sun50i-dmic.c @@ -317,8 +317,7 @@ static int sun50i_dmic_probe(struct platform_device *pdev) return -ENOMEM; /* Get the addresses */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(base)) return dev_err_probe(&pdev->dev, PTR_ERR(base), "get resource failed.\n");