Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3565859pxb; Tue, 7 Sep 2021 02:36:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys8yUvH/A0NmYlwJ4YELFiGAxtoDhxZi43j+dXXyI+XT4JTBlH3UNaW+7qoxVFBBsbxAe/ X-Received: by 2002:a92:cd4f:: with SMTP id v15mr509165ilq.64.1631007387256; Tue, 07 Sep 2021 02:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631007387; cv=none; d=google.com; s=arc-20160816; b=FUF4Wq8MP0Fe1FIRE4TKRhx1tDDzaW8x26orNz8ADj/2kiNB6HOg5YcX+E7iEvc7AM owGsUK+nOSoX6or6pr2bPSTyO5C4QaPjvGqw7Oiet9F+0hytccVVrknV7DJq8vKdb1Lf LxbMr6HcOS3ed8VydZ8HEJnzyPobh887VDfZuB7T0RjJ9/Zf5eiLtG0bqHeB/XD2pl+p LyBbzywc7xoIWMFYCLdvYqJ9f+d3+vWLBDH5Yvg99W/mDOx6JLV2LsFO0U3vC3dW36yz 3TOBLGJlDTErhlyJ8eSMg53gatHiQbnC5o4/AP/IvU4W5FNgpfAgc8NtRi0cMdHAVRIr eIew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=fi9KJvB0uKOTiDSe1cckvn8IvHJRMU38ZvORvT2Dc0k=; b=oAMIijVOf8KrKcesvrFU3hKBKqqVZI0hELcoZHKSzEyd7UyJuf7fBxxaf0h8HtsH3K BBM1heFmcojmt4eEp5ryvTTDq4YrbUs2CcPxgP5vFZdv8MyxoTPSAilf80ETrnpRWAUA p6/rOw96uGtqXNuEdd4Z6xPJdb3qdfaqhO8CCev+WIRHKVw6bWlv6OLd5oyDt6Zu/tVu oJiCmgDJ39WG0ELl0aks5wt+vcAEO9jtRzohR4iaIZysDGTWbToatZYilp4f9D0X8vbt /wJZzQjJ2IQ2hCgUqV18wGjf/zXMmQw/nwjwpBSBMjBXQE728HLVwf1zZlyXjsiJsa/B vpEQ== 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 b12si9452847ila.38.2021.09.07.02.36.15; Tue, 07 Sep 2021 02:36:27 -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 S243702AbhIGIuU (ORCPT + 99 others); Tue, 7 Sep 2021 04:50:20 -0400 Received: from mx21.baidu.com ([220.181.3.85]:60460 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S244110AbhIGIuP (ORCPT ); Tue, 7 Sep 2021 04:50:15 -0400 Received: from BC-Mail-Ex21.internal.baidu.com (unknown [172.31.51.15]) by Forcepoint Email with ESMTPS id 65EE28F4C4FAFC1E39F5; Tue, 7 Sep 2021 16:48:57 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex21.internal.baidu.com (172.31.51.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Tue, 7 Sep 2021 16:48:57 +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; Tue, 7 Sep 2021 16:48:56 +0800 From: Cai Huoqing To: CC: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , , , Subject: [PATCH] clk: qcom: common: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 16:48:50 +0800 Message-ID: <20210907084851.4050-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 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() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/clk/qcom/common.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c index 60d2a78d1395..0932e019dd12 100644 --- a/drivers/clk/qcom/common.c +++ b/drivers/clk/qcom/common.c @@ -73,11 +73,9 @@ struct regmap * qcom_cc_map(struct platform_device *pdev, const struct qcom_cc_desc *desc) { void __iomem *base; - struct resource *res; struct device *dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return ERR_CAST(base); @@ -313,11 +311,9 @@ int qcom_cc_probe_by_index(struct platform_device *pdev, int index, const struct qcom_cc_desc *desc) { struct regmap *regmap; - struct resource *res; void __iomem *base; - res = platform_get_resource(pdev, IORESOURCE_MEM, index); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, index); if (IS_ERR(base)) return -ENOMEM; -- 2.25.1