Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3545093pxb; Tue, 7 Sep 2021 01:56:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAyojrEoxOFgHKxwpu+hYrwZhFBJi/KVjqyCi8ob/orSzTSP6KrA05VJL6yBtWx+588Cck X-Received: by 2002:a17:906:1ec9:: with SMTP id m9mr17057602ejj.115.1631005019191; Tue, 07 Sep 2021 01:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631005019; cv=none; d=google.com; s=arc-20160816; b=zwQF7ryIMt89qk0szCVwlOSoa0qN5QQPW5hj1IjfbLKqhpKR/gu6Ge1MbSXeRaCt4O CU7y4xH6pVsuof89S1WmEbMltWNGG0QX3Vdiak7A1s3LwRRJUKi0qynVXzhvNU7xIObA sSJvv5diJcDQqUFf8AQm1aOgwwAcXk82OSEn/LdQItLZ1VCr2q7MKO/sgRFmNZPOT61s yE+sqN7VmOE9VV+vg/uNicUcXvnGoDVNms3MmHHLfIVpBLG5/9iF2fLCor8oM72Tcjjr iv+JH6YXPhnMvFl8MFsfx3cPEEfIUVOKmjgChnps8UcjYJc2cebXSrG2qKlBfYlbprIY P7UQ== 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=kVzqFmQdrl00rrYJUupEsQLMZ9sK7yNl/InP3svrgX8=; b=V4nhZv7SrU+Dv/iZwyY/nf+H6ShjJXf0XIOZjI5Wuojp71J5frUXKIa3qmYNYoJh6o Mmy+KtvPq8xKvWwyQvRIoOfzIHFjeZcm/vuDwaSEFXNYzfS9g7RdUZIPCHJIJsr6wMFX 57Lf9Z2aKaQmo5+5Zi5wvlkUrg7N7eSCx0hZWs1CPV+R3NXCC75UxNsGFqOS2Pdk9x2v aasJt9r0t9r8H/7i4+LW4BiilTEq4ROnvIFpNYGx7uAb2rJzC7AxWjv8dg3hSz4lCAlK Aov5qt4Vece63fEv5I00CwAYTWijijonLloXwkU4Pm6qBAlOxGUehxL75+Fm6JUB6et2 PLeg== 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 e10si433890edz.215.2021.09.07.01.56.36; Tue, 07 Sep 2021 01:56:59 -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 S244766AbhIGIyo (ORCPT + 99 others); Tue, 7 Sep 2021 04:54:44 -0400 Received: from mx21.baidu.com ([220.181.3.85]:36936 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S244906AbhIGIy0 (ORCPT ); Tue, 7 Sep 2021 04:54:26 -0400 Received: from Bc-Mail-Ex13.internal.baidu.com (unknown [172.31.51.53]) by Forcepoint Email with ESMTPS id D91F9CD37FECBDA86975; Tue, 7 Sep 2021 16:53:18 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by Bc-Mail-Ex13.internal.baidu.com (172.31.51.53) 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:53:18 +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:18 +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-ar100: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 16:53:11 +0800 Message-ID: <20210907085312.5070-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-ar100.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/sunxi/clk-sun6i-ar100.c b/drivers/clk/sunxi/clk-sun6i-ar100.c index 54babc2b4b9e..9f9a2cf54f41 100644 --- a/drivers/clk/sunxi/clk-sun6i-ar100.c +++ b/drivers/clk/sunxi/clk-sun6i-ar100.c @@ -71,12 +71,10 @@ static DEFINE_SPINLOCK(sun6i_ar100_lock); static int sun6i_a31_ar100_clk_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - 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