Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp289874pxb; Wed, 8 Sep 2021 00:57:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5YwOSlXTw//KyzsUaAzImvnGyrDNC9x4brta61Q32zzhp7ng++iSTM4ctI6n103VKwJxE X-Received: by 2002:a17:906:1454:: with SMTP id q20mr2796256ejc.446.1631087861811; Wed, 08 Sep 2021 00:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631087861; cv=none; d=google.com; s=arc-20160816; b=rGlgiIkgL/kzXW2su9bwhoRSt1TddXjUEQ0/XeU6khgbeRtp1UZipifD+ek2O+Jphk rUeZx7T+/GRbL0VWcp3lmayyvOv6aj0ah8s/9VFBkDnRBiUubfOf6xDh01TcueHKWLAm 0mswceBHxBCBJm3KHakzwt/BNKiC//oEOJnDSodUmqhuiW82pnIHVEMF2UY21VLMPqyy +n8j81ej5U6EEJ+emUTUI0/ryDyI9N+NhlYWLf6esNsQBeTPbdn2bVmJwu5/R0Unj5qN FnEn8TP2il5F1PRxyNu5bUC7nGwcdPiBU8PyPeAnELpqgg4SJXZXiY4gXKFOTRlWveln tWXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=OtNREU265+6DX/icBga3ufXC+MNZW3d3QXuUGT4U71I=; b=EEqZWTRloadrHOdfrAzD/KAYiD+ZfXrb934VWMkTuNI+YELP5XUr9j7u1ZRXmYoK7n Go7Lh2JJy1FuyMnCwrUICCebahfbi9wmH+7xIeeahwPrfIHALxKYfdwTXYfcE7SWS2FF XVBP2Xr+l63lRX/Vv2oFTdy81wa4nTvs9satPeestwuYtNpfhvT0+8pf/XfbRDkagUuz KyGAnfNRPRbtQoVQRk1mBo20129rw0p7pc1c1tZ8Y+Goacb8HMsVDaaKUdtmQktj3JyV tR8ToxhMf5g900v4zhO9i9wSg1P0cuXUMJC7KGqcdmyF+t0DRjpnEoO790Aubz40gVUa ZqrQ== 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 nc22si1718391ejc.494.2021.09.08.00.57.17; Wed, 08 Sep 2021 00:57:41 -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 S1351156AbhIHHsk (ORCPT + 99 others); Wed, 8 Sep 2021 03:48:40 -0400 Received: from mx21.baidu.com ([220.181.3.85]:39770 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1350866AbhIHHsP (ORCPT ); Wed, 8 Sep 2021 03:48:15 -0400 Received: from BC-Mail-Ex29.internal.baidu.com (unknown [172.31.51.23]) by Forcepoint Email with ESMTPS id 66B6284F64A0AA0F179C; Wed, 8 Sep 2021 15:47:06 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex29.internal.baidu.com (172.31.51.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 8 Sep 2021 15:47:05 +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, 8 Sep 2021 15:47:05 +0800 From: Cai Huoqing To: CC: Niklas Cassel , Andy Gross , "Bjorn Andersson" , , , Subject: [PATCH v2 6/6] soc: qcom: rpmh-rsc: Make use of the helper function devm_platform_ioremap_resource_byname() Date: Wed, 8 Sep 2021 15:46:51 +0800 Message-ID: <20210908074651.1025-4-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210908074651.1025-1-caihuoqing@baidu.com> References: <20210908074651.1025-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex09.internal.baidu.com (172.31.51.49) 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_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- v1->v2: Fix typo 'dri_id'->'drv_id' drivers/soc/qcom/rpmh-rsc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index e749a2b285d8..2834c6efc16b 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-rsc.c @@ -910,7 +910,6 @@ static int rpmh_rsc_probe(struct platform_device *pdev) { struct device_node *dn = pdev->dev.of_node; struct rsc_drv *drv; - struct resource *res; char drv_id[10] = {0}; int ret, irq; u32 solver_config; @@ -941,8 +940,7 @@ static int rpmh_rsc_probe(struct platform_device *pdev) drv->name = dev_name(&pdev->dev); snprintf(drv_id, ARRAY_SIZE(drv_id), "drv-%d", drv->id); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, drv_id); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource_byname(pdev, drv_id); if (IS_ERR(base)) return PTR_ERR(base); -- 2.25.1