Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp264945pxb; Wed, 8 Sep 2021 00:11:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykR39Rd3yIWOyqlx7q7qt0uxQFKQDH6D+gz/7yLoBWNSaV9NVWVFx8evsfrFS5N1Jiwzvn X-Received: by 2002:a17:907:784b:: with SMTP id lb11mr2579198ejc.307.1631085113603; Wed, 08 Sep 2021 00:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631085113; cv=none; d=google.com; s=arc-20160816; b=ust9VcMR8gfMVx66obPtPrVA7LU+bN3LbCWYpdFVPFyKdzuGjTeCuGkde6bUOsLm2E 0i1o0Ewcsiz8EYA8kseBoGEDW4mUKdpS6+klQPG5IvtzqN5IZ+0ySup9QjqfbxUD4Yvp F7urv3cspL3PyeIncUcAkLHEmHC6r3mUf3PPGQ7aa0NaMI8Mq1yshiRzZgzEGl2VevUe D6S291cuxHR2EKQTOmI3DgQyRtPU4M7gHFK8Ej3LdrdpNHahetHiA25CrEIvaJW4/XJx 3Bka0/VXDwa8pPsGIaLwh5Z1HF0X+nwaXVFmVOaYeoLXQzz5SdN/IMapQMKl8lzplu3Y tVxQ== 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=lZn999QGx+ix0jklCkApSMMN2Yk3XTKp0ERk9FJAag0=; b=PE45zUzsmF9MBN+pIl45R7m4IhmwjQGcEXUGTOlpK/+P4gthhG5AhKJU141lr9UQuw caVSronCQpc82zkkw5gK27R6Qzq68u6hL9UQAcw/eZzoN1JwXqs6ecIXKoOSVbfH5Yv4 7OVOIpaJFm4t3qelSjdRjWHJzTL24TW1DXWBqItyCyuapo+Dg93JJ/ZzwZMT3f0Yew9p IezPXiNL2HzaR3mAf7C5VGp1GekS7rPjPE3bMPXSIQBe7VCsAcjM4JbdIhk0teDD6i4O PWjS7SxKXDjAE+zvL46HWUe3ZiHFQbonxryDb/t4SyBzmXaNvUfzrajD9ssJRmsgap/d zxGQ== 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 e4si1582249ejs.733.2021.09.08.00.11.30; Wed, 08 Sep 2021 00:11:53 -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 S1348042AbhIHHLE (ORCPT + 99 others); Wed, 8 Sep 2021 03:11:04 -0400 Received: from mx20.baidu.com ([111.202.115.85]:54928 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232308AbhIHHK6 (ORCPT ); Wed, 8 Sep 2021 03:10:58 -0400 Received: from BC-Mail-Ex16.internal.baidu.com (unknown [172.31.51.56]) by Forcepoint Email with ESMTPS id 349EE15A96DA0F9E3D0B; Wed, 8 Sep 2021 15:09:41 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex16.internal.baidu.com (172.31.51.56) 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:09:40 +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:09:40 +0800 From: Cai Huoqing To: CC: Niklas Cassel , Andy Gross , "Bjorn Andersson" , , , Subject: [PATCH 2/6] soc: qcom: ocmem: Make use of the helper function devm_platform_ioremap_resource_byname() Date: Wed, 8 Sep 2021 15:09:26 +0800 Message-ID: <20210908070930.214-2-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210908070930.214-1-caihuoqing@baidu.com> References: <20210908070930.214-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex11.internal.baidu.com (10.127.64.34) 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 --- 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