From patchwork Wed Mar 22 03:16:42 2023 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: 13183504 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 724EEC6FD20 for ; Wed, 22 Mar 2023 03:16:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbjCVDQr (ORCPT ); Tue, 21 Mar 2023 23:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbjCVDQq (ORCPT ); Tue, 21 Mar 2023 23:16:46 -0400 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0341C5552D; Tue, 21 Mar 2023 20:16:46 -0700 (PDT) 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 mxct.zte.com.cn (FangMail) with ESMTPS id 4PhDCc2trVz501Sb; Wed, 22 Mar 2023 11:16:44 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl2.zte.com.cn with SMTP id 32M3Gfiv008647; Wed, 22 Mar 2023 11:16:41 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Wed, 22 Mar 2023 11:16:42 +0800 (CST) Date: Wed, 22 Mar 2023 11:16:42 +0800 (CST) X-Zmail-TransId: 2afa641a731a6d0-b7682 X-Mailer: Zmail v1.0 Message-ID: <202303221116427329010@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , Subject: =?utf-8?q?=5BPATCH=5D_remoteproc=3A_qcom=3A_wcnss=3A_use=C2=A0devm?= =?utf-8?q?=5Fplatform=5Fioremap=5Fresource=5Fbyname=28=29?= X-MAIL: mse-fl2.zte.com.cn 32M3Gfiv008647 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 641A731C.000/4PhDCc2trVz501Sb Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org From: Ye Xingchen Convert platform_get_resource_byname(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does. Signed-off-by: Ye Xingchen --- drivers/remoteproc/qcom_wcnss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 9d4d04fff8c6..f678dda1ed6c 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -538,7 +538,6 @@ static int wcnss_probe(struct platform_device *pdev) const char *fw_name = WCNSS_FIRMWARE_NAME; const struct wcnss_data *data; struct qcom_wcnss *wcnss; - struct resource *res; struct rproc *rproc; void __iomem *mmio; int ret; @@ -576,8 +575,7 @@ static int wcnss_probe(struct platform_device *pdev) mutex_init(&wcnss->iris_lock); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pmu"); - mmio = devm_ioremap_resource(&pdev->dev, res); + mmio = devm_platform_ioremap_resource_byname(pdev, "pmu"); if (IS_ERR(mmio)) { ret = PTR_ERR(mmio); goto free_rproc;