Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3574645pxb; Tue, 7 Sep 2021 02:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzysKdZuxGhseKLcHqxXXoSWpGKkicZMz9ORUR/unOxETI3sPR3hQrHaC0MreY5P76VYCzD X-Received: by 2002:a17:906:a04f:: with SMTP id bg15mr18507664ejb.417.1631008383318; Tue, 07 Sep 2021 02:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631008383; cv=none; d=google.com; s=arc-20160816; b=m+QHBsEzG8SlpYfxNxxdLjNFWODBCgcnf7f5pHMyAfAgAoJmcj4HbPi9G0XUsM/6ha go5NUKCIhUZ3ZBCmZvIRjPcO2Dfwv+9mGnrO+DzTqn0h2mPstxbzsbnqaHv8TJRE8hEY WfKh22d3VKL9ZLOCUybpNyZsI4kWB6ic7HxpVQM5qBBWAj7dJjoFKTUByzKvsxirnXkY 2+UGjExXuFeIzTkpgq8edv2B8nrnWcj0vxgoTgcr2lowgW1B75eUNWMQpn/k1R+oCCXL wL8l/Orgq0+ZoJvbgom5HLIPIspCiEk93/b63CGcgHJBD2sgKT/Tranqq63YOP+X4k6i xLoA== 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=4LlbmFBNTZzz7X20zoZHxIAaKL8SUmqCQ/uUE4bemuk=; b=fuwdBtAyrErlvCsZKTpOvwfZOxCGYoKALNKzPEr9489N89ODJ2RD8KiH37OAO68FCt kRcg5NfcLv7F+6pCqnq/bm3s7Y8Jz/n3G8mMmqRFEC0Hr4x6TqL+l/DnqK0Njmv8kQIU aLjSTqIyQ9pwy8BM9/cXbnJ0uO0wL4QCpAEsUYjt7awgN5jcRk2cK25IxY0qu6lDN+Dj y7A/HLdOCzs8bR4xnvj86a0jmoFtiHRh8GI+N5Ylt1qG5vh9AUuIBU+VUFyvbEAcymwm lEBUTT+e+ePZsQpuJiwhSHxtaCYf7cLffErj0kMwx9f2krEtO9wjjZsveTSk0j7Np1ap 7oYA== 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 h4si12528047edt.426.2021.09.07.02.52.40; Tue, 07 Sep 2021 02:53:03 -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 S243709AbhIGIta (ORCPT + 99 others); Tue, 7 Sep 2021 04:49:30 -0400 Received: from mx21.baidu.com ([220.181.3.85]:59902 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243534AbhIGIt3 (ORCPT ); Tue, 7 Sep 2021 04:49:29 -0400 Received: from BC-Mail-EX08.internal.baidu.com (unknown [172.31.51.48]) by Forcepoint Email with ESMTPS id CF7E23DC41C97C714CBB; Tue, 7 Sep 2021 16:48:20 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX08.internal.baidu.com (172.31.51.48) 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:20 +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:20 +0800 From: Cai Huoqing To: CC: Michael Turquette , Stephen Boyd , Matthias Brugger , , , , Subject: [PATCH] clk: mediatek: mt6765: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 16:48:13 +0800 Message-ID: <20210907084814.3795-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/mediatek/clk-mt6765.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt6765.c b/drivers/clk/mediatek/clk-mt6765.c index d77ea5aff292..38c0e4c4ee76 100644 --- a/drivers/clk/mediatek/clk-mt6765.c +++ b/drivers/clk/mediatek/clk-mt6765.c @@ -776,9 +776,8 @@ static int clk_mt6765_apmixed_probe(struct platform_device *pdev) int r; struct device_node *node = pdev->dev.of_node; void __iomem *base; - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { pr_err("%s(): ioremap failed\n", __func__); return PTR_ERR(base); @@ -811,9 +810,8 @@ static int clk_mt6765_top_probe(struct platform_device *pdev) struct device_node *node = pdev->dev.of_node; void __iomem *base; struct clk_onecell_data *clk_data; - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { pr_err("%s(): ioremap failed\n", __func__); return PTR_ERR(base); @@ -851,9 +849,8 @@ static int clk_mt6765_ifr_probe(struct platform_device *pdev) int r; struct device_node *node = pdev->dev.of_node; void __iomem *base; - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { pr_err("%s(): ioremap failed\n", __func__); return PTR_ERR(base); -- 2.25.1