Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp923832pxb; Wed, 1 Sep 2021 12:48:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9wcO26V9S/IG/yWSem6dHiMUQiDMvAutpql029oG5gGvxwb38yrUgXNjFC3w8X4nfypS3 X-Received: by 2002:a5d:8458:: with SMTP id w24mr1009806ior.168.1630525725580; Wed, 01 Sep 2021 12:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630525725; cv=none; d=google.com; s=arc-20160816; b=GkdiQSR91/2V753ZMAulD+qEu7ZQJmBu1xgoJw+VCzSC/TBapSc9/2+lIoIfGq9+Q5 8hRRiGlhMmFjk713c80NziOy9bnlh2MQDqEMtJBMnPP/+v/skvniOY5VcAbceQJsXLrT G+vZ/hLXqriM94jf1huipz4qwrLUpZDSg5OIn/c+WmY1xx5tlH9rl+gZh7CZLL8eKqi1 KtzgQyxX5PGhMhCFAVJ57ZsD5O+B3z7dK64hObdzOP22kW72AgUS3d68dIP9R5W+G1AP LdWG/YrHlfFE5/a2qhkLBIaU4W6HV02DJ7rxHfikD+MG7fs8cDaMIXFidJEHdRNVebdf kI5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=Svsv0vTl9zfiP9hTvvx8kNjvNm/VHlyYUuXLG3p2Eo4=; b=0VHvY64QnWjxIk/OH5eYhtgxmzOze3yKUQ338exQe6ngHFp8HCiiAlphRM38sVahKs tOamu1naQS5GRXUYHEzUFfgw23pQBVWYcjutRTdwer4rUh/g2aNNzBsw2ubv+1FjjnCh cDje6qVDqXbbuc1FR5x09zfFeFhBLPw15dchpk9wrqns7iUGv9I6rN1pPQpzn5nWQy1j 86DtqXs0X2jyI46+JWKsT0v8Zh1dmEAa089kjVEiiBsBdKfA5clXtjlhk64OaCH1vqUy VSx/DOOumu/ITZD5Oso8WTrxUgxhgM2RF2elZmg1sXiCcD02x7V4D7LMBtPppx56tZQ6 hjJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k20si424270iog.64.2021.09.01.12.48.33; Wed, 01 Sep 2021 12:48:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243527AbhIAN2t (ORCPT + 99 others); Wed, 1 Sep 2021 09:28:49 -0400 Received: from mx21.baidu.com ([220.181.3.85]:53902 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233820AbhIAN2s (ORCPT ); Wed, 1 Sep 2021 09:28:48 -0400 Received: from BC-Mail-Ex10.internal.baidu.com (unknown [172.31.51.50]) by Forcepoint Email with ESMTPS id F20DEC87C20556AC1684; Wed, 1 Sep 2021 21:27:48 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex10.internal.baidu.com (172.31.51.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 1 Sep 2021 21:27:48 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 1 Sep 2021 21:27:48 +0800 From: Cai Huoqing To: CC: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , "Matthias Brugger" , , , , Subject: [PATCH] ASoC: mediatek: mt8195: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 21:27:41 +0800 Message-ID: <20210901132742.31714-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex21.internal.baidu.com (172.31.51.15) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c index 6635c3f72ecc..8c697f41d51d 100644 --- a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c +++ b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c @@ -3057,7 +3057,6 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev) { struct mtk_base_afe *afe; struct mt8195_afe_private *afe_priv; - struct resource *res; struct device *dev = &pdev->dev; int i, irq_id, ret; struct snd_soc_component *component; @@ -3078,8 +3077,7 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev) afe_priv = afe->platform_priv; afe->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - afe->base_addr = devm_ioremap_resource(&pdev->dev, res); + afe->base_addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(afe->base_addr)) return PTR_ERR(afe->base_addr); -- 2.25.1