Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3573981pxb; Tue, 7 Sep 2021 02:51:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxzvqCPDCwlg9HIUH1PDozj5TsiCQvbNkWxQlln8ZTW6kbmIVIyCLtZPwUtXR7w4kcxwPc X-Received: by 2002:a17:907:76ee:: with SMTP id kg14mr17759208ejc.90.1631008309889; Tue, 07 Sep 2021 02:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631008309; cv=none; d=google.com; s=arc-20160816; b=DrCeK/aM/e1OKUQAQ523yoocPd9f3C8AiGe3A7y/1kixstI3GJb6n8Jny08Bq0lk0o kjDFUm5GxoM6wieNEvQ7DxZyFssqyD5jSWnxSTrerb5l3URpqdHeLDWdhtIpTlsyPcQ7 DH4MB5dHuqLr28kM5RHYKRsPhr+0ECGi11NOBKppPW/j1BwiC+3HSrkURK3UhzeW/HjW JfK9f+Fz4F6KyqUa00JG0mb5+nausFKLAaHwh1pF2n2fZbeNqPO8RYPLzuRvRynEHXK3 TsRxQRHwvH5jM2F+/gFG+iRzVXA0CBbJ7awcftbEoDSCWRv9kw2bYz2uLGSNdmr2vK4v uR9g== 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=JyhVlKdJuiDoK7WHT01fm1CItA3g7Y76bVvsbIWFG8E=; b=UlQTCOcg1WZxMAA2DyJzAD8G8AHRpNFqMVQUWh4LWkHXhdeobgKWQ1SCeASXYPBCmd cAx4EFeM9WOBKls2OsjWCkd29L8FqHM1iIjVBc3grXmiSPLtEW6GRqV3ShgPbA7+6kZt 2VZ+IpX4qfd2wkSkyaddM6X4aaPCTfjwx1n46oqYNpY7HATujCSbJgM962I27JQwAke+ Y9Z57aFBywMS23LMgcIDsCnOkNhAzjJufBBQSHNILCCQvuq06xpd2G0DO/F83Phino5n H8LYJQmnXyjpWMmwhbFi/zwE36ByGVNpdNZ29HEl7LSUCxGDzh3VBHnLd77wV0ANG1Qx RyGA== 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 js7si8425817ejc.83.2021.09.07.02.51.22; Tue, 07 Sep 2021 02:51:49 -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 S244540AbhIGIyg (ORCPT + 99 others); Tue, 7 Sep 2021 04:54:36 -0400 Received: from mx21.baidu.com ([220.181.3.85]:36570 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243215AbhIGIyO (ORCPT ); Tue, 7 Sep 2021 04:54:14 -0400 Received: from BC-Mail-HQEx02.internal.baidu.com (unknown [172.31.51.58]) by Forcepoint Email with ESMTPS id 2F9E0B40DCDBBED084B7; Tue, 7 Sep 2021 16:53:04 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-HQEx02.internal.baidu.com (172.31.51.58) 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:53:03 +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:53:03 +0800 From: Cai Huoqing To: CC: =?UTF-8?q?Emilio=20L=C3=B3pez?= , Michael Turquette , Stephen Boyd , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , , , , Subject: [PATCH] clk: sunxi: sun6i-apb0: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 16:52:57 +0800 Message-ID: <20210907085257.4968-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/sunxi/clk-sun6i-apb0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/sunxi/clk-sun6i-apb0.c b/drivers/clk/sunxi/clk-sun6i-apb0.c index 10f70c35c265..f80c67bafe38 100644 --- a/drivers/clk/sunxi/clk-sun6i-apb0.c +++ b/drivers/clk/sunxi/clk-sun6i-apb0.c @@ -32,12 +32,10 @@ static int sun6i_a31_apb0_clk_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; const char *clk_name = np->name; const char *clk_parent; - struct resource *r; void __iomem *reg; struct clk *clk; - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - reg = devm_ioremap_resource(&pdev->dev, r); + reg = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(reg)) return PTR_ERR(reg); -- 2.25.1