Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp345527pxb; Wed, 8 Sep 2021 02:34:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoTblfvKf9gJVIxW9+D7/4P4YjIXAYLdGButZ1yByAPv5ZT9JNFiJQUBFbwXJCZEA2gf1O X-Received: by 2002:aa7:dcc2:: with SMTP id w2mr2877124edu.192.1631093640567; Wed, 08 Sep 2021 02:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631093640; cv=none; d=google.com; s=arc-20160816; b=uMOs6bd51xSuqtZYfFLfi95jesk4Idw+HZPiAVia821ytAk7MlJ13uIekNCWMKkadA cJrqD4xRVxOTn5BKUuJIG7GjQfbcOqCLMRaLmRP7uF976A3zMkiP8JnyhjCFu8gbMLaP 5MFhBoBHOb4OiOZP6LOjY/I5XkV7YMhJrYk8FHlbjVm1w452NUm3GREInJNtCHm80r+V bWaYodkEZfhs38t15oDoeOk3Jn1YG4MSUIt67v8Oc+vF4/grdCmfaD600s8DoblljBiD cplcQmOkxs9mtWw5V6+F90U+EqG22JHFoXUIBwOxVbt8kmkP2kR9G1lCWymhAyzCKB+d XBNw== 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=Yl9VeORvmp/rOIrEmXhFxrArJ3jTYikVIJB2gJ1Y/yZX8vuU0ACjLqg2mXav34Wa1P y/SMDu8q/HbLBDvP8is830ISMdEmSHUyVFtzcXDuMUfsPYEDSNeuIqxkHKcxB1hIiK1l +9cewZEqZvnFVmPNlLQhs0TE4/i/e//ERaWzeQrnFll054sZ8zFC2xRgS+zXh5XGNCI0 1RBN7LJeuZqFbIk+TgLlX34H39pjd3RD8Ce90QbIVB2x+tPdYiAsh2Ya8fsUF2A0FbnN vWmR+0ZV62lwEnhRXKpcV6ee+/3AXgSfvgd2cYeUhgRZhL1uQC1qJ/6o0TfbIxSpl7ig WI9A== 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 i5si1605057ejd.224.2021.09.08.02.33.33; Wed, 08 Sep 2021 02:34:00 -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 S1351166AbhIHHsi (ORCPT + 99 others); Wed, 8 Sep 2021 03:48:38 -0400 Received: from mx21.baidu.com ([220.181.3.85]:39628 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1347718AbhIHHsM (ORCPT ); Wed, 8 Sep 2021 03:48:12 -0400 Received: from BC-Mail-Ex31.internal.baidu.com (unknown [172.31.51.25]) by Forcepoint Email with ESMTPS id DDA0AC918649E85983D4; Wed, 8 Sep 2021 15:47:01 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex31.internal.baidu.com (172.31.51.25) 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:01 +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:01 +0800 From: Cai Huoqing To: CC: Niklas Cassel , Andy Gross , "Bjorn Andersson" , , , Subject: [PATCH v2 2/6] soc: qcom: ocmem: Make use of the helper function devm_platform_ioremap_resource_byname() Date: Wed, 8 Sep 2021 15:46:49 +0800 Message-ID: <20210908074651.1025-2-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 --- 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