Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3567282pxb; Tue, 7 Sep 2021 02:39:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj4JWNS+qftfntfVDYWJ3xxNFEpGBNgUONbj/D+pWm17bx8u9hNTkD4gbJx+tSn/l53/cv X-Received: by 2002:a92:1952:: with SMTP id e18mr7498648ilm.291.1631007551121; Tue, 07 Sep 2021 02:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631007551; cv=none; d=google.com; s=arc-20160816; b=fiwll/OZI0DZTPP4B1XeKaHpVsYrtdLPZSfW5SgKjh3N3wwhah1hwIpKvVSBcaTTnJ EdKYIB8VLRej9dXeIBSd5eHs+hlqtMA8L6AuWSMdNiTA4XYsAG+vDdpIDmbi7SmAMKGt IJEIw7M+QgqQw25+2/JFwp/yZBgV4m8YkDBk3XwotS+7Q0rwFh3XPGFqhFdigoSrBuRY 6SiYqgXsV+DPgMPGzXBTqzECSXonM1wOTqxI2uL4CflkvwpXtY7lj8jYR75m34hgL5ZY dPOyFxnlzId8ak0pnW7GOrQnFKm8WZQL6bZPleuzPUa2XLGed487YvrDFSHOs+fmOXY5 rGVw== 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=Aw8rLaszju4I2+5Nhh9AcQED27xUJLsi5p1fTNoIY2g=; b=By+CX+n7fu4nB6Y1j5UFH+cdixtYkgQDJuCg7600RmyUB+y+yqmsmH0Zjk/RtZJj7g wJcBEC7VFa9cf8Ofz6baG0f/Dox2HRKlTwz62I3WTvDhXielKtUdR5sIG4Gw5cure1pU JsVyhLBsTu3v0/Li+v1R7s0++0us9DX1NG0h+FxiWMkPTWn5OUTnGl5K+upKuwoJYiDd 63cK/ktfT6Q0Us65hH0QqVH23Bxi4VnwAX6pQSruZK8fR5lJ5ZJPIzB6bWEmad2yZK3r mhrpVoau/nE0D8ZqBV1ngkvshXMdyOVN1BVhk7lyFscMI2fg7phgwsZ/ehF3R6lrxC0d JcuQ== 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 a5si10096071ioo.37.2021.09.07.02.38.59; Tue, 07 Sep 2021 02:39:11 -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 S243761AbhIGIxI (ORCPT + 99 others); Tue, 7 Sep 2021 04:53:08 -0400 Received: from mx21.baidu.com ([220.181.3.85]:35192 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243412AbhIGIxG (ORCPT ); Tue, 7 Sep 2021 04:53:06 -0400 Received: from BJHW-Mail-Ex01.internal.baidu.com (unknown [10.127.64.11]) by Forcepoint Email with ESMTPS id CDECE9DE70CA9AD88718; Tue, 7 Sep 2021 16:51:57 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex01.internal.baidu.com (10.127.64.11) 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:51: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:51:57 +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: clk-mod0: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 16:51:50 +0800 Message-ID: <20210907085151.4509-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-mod0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c index f9d715ec9908..51800289ada9 100644 --- a/drivers/clk/sunxi/clk-mod0.c +++ b/drivers/clk/sunxi/clk-mod0.c @@ -88,14 +88,12 @@ CLK_OF_DECLARE_DRIVER(sun4i_a10_mod0, "allwinner,sun4i-a10-mod0-clk", static int sun4i_a10_mod0_clk_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - struct resource *r; void __iomem *reg; if (!np) return -ENODEV; - 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