Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp347747pxb; Wed, 8 Sep 2021 02:37:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylEfA3U3HK/rxv5G7Wq8YpxQu/BUZFczzUZiXdYnMWutySdtoVYS9e5jxniG1VEMD9dPsc X-Received: by 2002:a17:906:1454:: with SMTP id q20mr3177573ejc.446.1631093846899; Wed, 08 Sep 2021 02:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631093846; cv=none; d=google.com; s=arc-20160816; b=JkKjaeu1D+VYDyoYnOxobpcQNSa6K8kCDM2eemzXWxDeXjhxviNnjKQsfzGhuBA67o 2lb3HIOK26pdf8nmCb108jAl9vgYIesGzetGeoySG/zMK8I2+p+PyS9SrZ3mBE36B7H6 oRHwzACjQApmuIW53DkDqBhtAgMdQ+5FFtaoJdYDEHegXWloFQhQWgBCTZjiWDgGXq2n xv2nzRF7VvbfxgWJpLmNkJe3izq/GxQNItYPmM5rXuP4Et5mVZuJK1RcLd7+0Oc+0Ugq KP2t3+cj/aGtLHlwwtVEWVWZXqFHaxEjo4oMUPbmiR3VgL/DjYHd8FWJ1JJsGLPERgxI zBrQ== 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=uz7DuNiDs0vXEKXfD2EaUQouDBKesuts9pARadRdBmc=; b=Y/U3Ed0Wf2BhOm7Bt0Vf4y6FwCmC40Wusvh2ZuggDlcRLuvd2hvxqFVcykT9fwZ+x7 KPsR9Cx1hfIGWnQdgHfaa1iPKgoGD6TVKhqTToqbBMMHdJJTkkNnDI1ZB4W7m4tLcywg gkDDMUsSLVNXWZewF+4LKGT89+NtN/w2vXBW4TVqYG4Ni36i++31CjfHOMpnZm+MgGOq 0HLefVQjP62D8Ycj8SjgFQuU40Pehn3EHlxXFYrPBpd8QvrZUlJ+4P3V0JvIVOJgPupS r9NjBJhgSNQ4TDchg+fj4O1GlFAKB39+SAGzFgXDwgAj5JDsYkU1Gw/fhfaJbm5ITqgI 1v1g== 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 i11si2368539edb.418.2021.09.08.02.37.02; Wed, 08 Sep 2021 02:37:26 -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 S1347784AbhIHIDk (ORCPT + 99 others); Wed, 8 Sep 2021 04:03:40 -0400 Received: from mx20.baidu.com ([111.202.115.85]:56338 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234779AbhIHIDf (ORCPT ); Wed, 8 Sep 2021 04:03:35 -0400 Received: from BC-Mail-Ex07.internal.baidu.com (unknown [172.31.51.47]) by Forcepoint Email with ESMTPS id 1E793C96C21291997C8A; Wed, 8 Sep 2021 16:02:26 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX07.internal.baidu.com (172.31.51.47) 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 16:02:25 +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 16:02:25 +0800 From: Cai Huoqing To: CC: Niklas Cassel , Andy Gross , "Bjorn Andersson" , , , Subject: [PATCH v3 2/6] soc: qcom: ocmem: Make use of the helper function devm_platform_ioremap_resource_byname() Date: Wed, 8 Sep 2021 16:02:12 +0800 Message-ID: <20210908080216.1301-2-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210908080216.1301-1-caihuoqing@baidu.com> References: <20210908080216.1301-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex11.internal.baidu.com (172.31.51.51) 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: [PATCH 6/6] Fix typo 'dri_id'->'drv_id' v2->v3: Just send it as a series drivers/soc/qcom/ocmem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c index f1875dc31ae2..d2dacbbaafbd 100644 --- a/drivers/soc/qcom/ocmem.c +++ b/drivers/soc/qcom/ocmem.c @@ -300,7 +300,6 @@ static int ocmem_dev_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; unsigned long reg, region_size; int i, j, ret, num_banks; - struct resource *res; struct ocmem *ocmem; if (!qcom_scm_is_available()) @@ -321,8 +320,7 @@ static int ocmem_dev_probe(struct platform_device *pdev) return ret; } - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl"); - ocmem->mmio = devm_ioremap_resource(&pdev->dev, res); + ocmem->mmio = devm_platform_ioremap_resource_byname(pdev, "ctrl"); if (IS_ERR(ocmem->mmio)) { dev_err(&pdev->dev, "Failed to ioremap ocmem_ctrl resource\n"); return PTR_ERR(ocmem->mmio); -- 2.25.1