Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3544908pxb; Tue, 7 Sep 2021 01:56:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqvyJ00Osv5VG7hfzqlN7pgb2GfHnnhwan3yPTlQPcVDfdWf4ffWMcnh/GYGRahQ2rQGIb X-Received: by 2002:a17:906:3a57:: with SMTP id a23mr17449082ejf.469.1631004990673; Tue, 07 Sep 2021 01:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631004990; cv=none; d=google.com; s=arc-20160816; b=VKzF/ohVXY7458+hD3aoJyUJgsa8CvujuNIOywp5kwD08M6QoYfdVbg9y/tScCpQJ/ j+q96AsEuudzFXqmD2kgbCNEskDUQKe414W80fdyBT4sTmlOkFkl/lWrO0lyKu4wM1UD lC2eRuUzmcUvS0k66xznJxfzLI4IoeyHRu+8sa3BZNX2D61G0sfPu43R/im4mKTxLYBx /oMdX9LWA4lQwC3yz4oY7nsutVv70bmDXp+8xp7fI0CpGC3yyiTnrOteClcnCiNo/uAM vaWy9+Pb/G9XqC0v42FJBhDfks4+CY1q6fm436VPZ/1gEdFi9q7hI8K+i+TtldWnAZeg JHFg== 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=XxtYNu1sQHiWzV10+S6HpT/VdJEHdreItz8VdmWwsWg=; b=oxJtlaf8jsYwRuPsOUEVxFG8N5jhwgAopqhM01FtV1dmU01BYTKe/UcZE1qCKqL5Lb et01YvY/wTOxKmUbLP7p7TEqMAN7fke+6rBUpESATdsvpkP5oed3wRksCRIOqKlUROV5 K3Jd/ftNH00KZoqwzi5Hh2lptSifHnBB2lzSx5SGaG2PPK2HXNB9jVNDpuXotlx/RM0F 9tmfqtTvoiN9nHqditJfSQtTYeOuZM1RWOybPxS6rqpoJtDXs9VRiiysnv/g7In4/+Qb 6HI2HSTBDOzXdBLL6cog45gbQjKhD+CTFm80k2qtDo2vlpaCQRy/svVNc+WWgCOf4X/U e+cw== 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 dp9si10693660ejc.163.2021.09.07.01.56.07; Tue, 07 Sep 2021 01:56:30 -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 S244756AbhIGIyi (ORCPT + 99 others); Tue, 7 Sep 2021 04:54:38 -0400 Received: from mx20.baidu.com ([111.202.115.85]:36772 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S244718AbhIGIyT (ORCPT ); Tue, 7 Sep 2021 04:54:19 -0400 Received: from BC-Mail-HQEX01.internal.baidu.com (unknown [172.31.51.57]) by Forcepoint Email with ESMTPS id 7C0F077F051A8616F743; Tue, 7 Sep 2021 16:53:11 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-HQEX01.internal.baidu.com (172.31.51.57) 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:11 +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:10 +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-gates: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 16:53:04 +0800 Message-ID: <20210907085305.5019-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-gates.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/sunxi/clk-sun6i-apb0-gates.c b/drivers/clk/sunxi/clk-sun6i-apb0-gates.c index 4c75b0770c74..e4cf1180b088 100644 --- a/drivers/clk/sunxi/clk-sun6i-apb0-gates.c +++ b/drivers/clk/sunxi/clk-sun6i-apb0-gates.c @@ -40,7 +40,6 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev) const struct gates_data *data; const char *clk_parent; const char *clk_name; - struct resource *r; void __iomem *reg; int ngates; int i; @@ -53,8 +52,7 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev) if (!data) 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