Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3543467pxb; Tue, 7 Sep 2021 01:53:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZDQ5dip63aElynrzzork8laFEgNb8Gsr7Ovr55v/QePPWnzm0Y4xR4GWCBMCtc5VYrH8R X-Received: by 2002:a17:906:a94f:: with SMTP id hh15mr17469533ejb.297.1631004827919; Tue, 07 Sep 2021 01:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631004827; cv=none; d=google.com; s=arc-20160816; b=pUraTLIU0894IlQYPHiQBYmfEXDKBLVxm/CQrLVbcBqwUynmai4Y488onSnpi3TGnF BpnQ9dQ/kouPES3l86OWhR6LIrT29VEALOZriI4FH9PdeZYNuyDsKJamjsHumlru5EQh tTw8s3UPXqU/bS1IuHzqKUsYrb1DV/Z77xKuklBH//dwLLCkkFjGHUi6kiNQ80r4AFIO g8uirghAAkbAvW29Zun4xZ1E8TFxb4Y/lwA+7SErBqVGYXdxRwQ5T+f86yY/k3ZrS/e8 P1eLtQQoMg4SiWMiI+hgAuqRoO3D0bxC28y6TM4SzWI0geqEPhkuUairWeXchEKqRCZq SsCA== 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=yKxf24AP1BQlPxHfXDm3rgcpUW/+QVO9U7FE6bH+ecM=; b=OSaG8PKvHn2Kcm2joiKz4bLgVtNBiNotVTo2++zo07TlCjkS+Kicvb+GV08qApUs6Q s9z6QuqbwUOt+E3ypm2wY714XaR2o7766ZEntJbkRABLkjyJ5YUzVMd5csVLNmLNqng9 XLjw6F5Kuc06rgt4QsvUQ9Du8PBx6gxfln0V0B4wkEV3Lz9VcU8Hx6hK9i+0n65+W8p9 lkWWB2dE0eYSWb9z1eP09Q58JU4oO/aSMvkzYUVYvcSVfaxtYsuO/4v5o6K1mvEBppXf 9w6+JdxXYk5HFhm8s0kUxRjKkJ6rs8QcQFBeiDdsG6ciViH4H+d9Dp6mp0i5v9OVSeSL PzcA== 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 n25si11301833edr.243.2021.09.07.01.53.25; Tue, 07 Sep 2021 01:53:47 -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 S244153AbhIGIxC (ORCPT + 99 others); Tue, 7 Sep 2021 04:53:02 -0400 Received: from mx20.baidu.com ([111.202.115.85]:34886 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S244099AbhIGIww (ORCPT ); Tue, 7 Sep 2021 04:52:52 -0400 Received: from BJHW-Mail-Ex08.internal.baidu.com (unknown [10.127.64.18]) by Forcepoint Email with ESMTPS id 39F5F199E1D3D9B9E4C5; Tue, 7 Sep 2021 16:51:43 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex08.internal.baidu.com (10.127.64.18) 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:43 +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:42 +0800 From: Cai Huoqing To: CC: Dinh Nguyen , Michael Turquette , Stephen Boyd , , Subject: [PATCH] clk: socfpga: agilex: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 7 Sep 2021 16:51:36 +0800 Message-ID: <20210907085137.4407-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) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex08_2021-09-07 16:51:43:259 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/socfpga/clk-agilex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/socfpga/clk-agilex.c b/drivers/clk/socfpga/clk-agilex.c index 242e94c0cf8a..863716a6fdbb 100644 --- a/drivers/clk/socfpga/clk-agilex.c +++ b/drivers/clk/socfpga/clk-agilex.c @@ -509,12 +509,10 @@ static int n5x_clkmgr_init(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct device *dev = &pdev->dev; struct stratix10_clock_data *clk_data; - struct resource *res; void __iomem *base; int i, num_clks; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); -- 2.25.1