From patchwork Fri Apr 28 07:00:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 88469 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp748656vqo; Fri, 28 Apr 2023 00:08:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4k8kLfZrWogBlUaf1agVp/MI5NgeXTq8Nv076n/xuH6XGfEyt6vJMOX2SCZCjUj06w759h X-Received: by 2002:a17:903:1c2:b0:1a1:cb18:7f99 with SMTP id e2-20020a17090301c200b001a1cb187f99mr5322107plh.30.1682665697206; Fri, 28 Apr 2023 00:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682665697; cv=none; d=google.com; s=arc-20160816; b=BEKlIhGyr0n0gZV0TJrIiR2NoW6Zw/qtaD4gMCi26uXZ2O2V26kzF1K/GIjxtiTZeG V+SH3AgxQiQUUs1pydFKRmt5eL0tA6DPX6IyAyd0p+wOxy3vTc5hK+fTk+SIP5SH2rMh xDzGR1Mo/2YnhyXGSB8paKRuqNdkJ21STtBKq75rFId/nZ/aAE9Jgy5R3Yj86kAKyuA+ lJR6t2EINeICCixHtCIZYvE9bSjY9G0elxHIYNV+GTbB6QWu6VrjL4GU6jhSzf+7DcDV Q0CFV1QeyGFzQIguxAZxT0TWBXnA9m+YwW1IdJkYSB2Tl3KIODQY9MHMiXhlvopQmizK 0Opg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=yNjoz57kloBoXYNqMaF8uD1PZ5QjyClff0RQI8B3xIQ=; b=YC0i66pCjk69fVVoMHMAwdSyMOrnMA+6ZDmYpEzo6Qye+I7LtLIwIraadLaSxXq5YD 16sI8TnVnCQcHZf4D4LqorAVpGx6vjr0EOWDeeNUMp8GSqxf84RRH3+6EUAf3lrAyvrg f7RdlB+y/BlJ+ZazwcrrzmnzuTDPSzFyEkkvWWBYUBTW4oth+oDGPiSgQZLAqFg2BHbx ZiQMJA7Z9U9B0aMbXTbydN/vvHt7PwPiWwTA5IcOPadJjc+/xABquYAEVA8fYWg4Bvae ByQz01BrYdF6/HT8WWDi9x9l90IiRkfFakDR4StnUnlc2GdvJoBmtVssclbeq5CsZRlY 8geQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a17090301c500b0019c354055d0si21587544plh.304.2023.04.28.00.08.04; Fri, 28 Apr 2023 00:08:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229680AbjD1HAO (ORCPT + 99 others); Fri, 28 Apr 2023 03:00:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345340AbjD1HAM (ORCPT ); Fri, 28 Apr 2023 03:00:12 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAB111FE4; Fri, 28 Apr 2023 00:00:10 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R931e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VhAGz.P_1682665205; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VhAGz.P_1682665205) by smtp.aliyun-inc.com; Fri, 28 Apr 2023 15:00:06 +0800 From: Yang Li To: mturquette@baylibre.com Cc: sboyd@kernel.org, palmer@dabbelt.com, paul.walmsley@sifive.com, linux-clk@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] clk: sifive: Use devm_platform_ioremap_resource() Date: Fri, 28 Apr 2023 15:00:05 +0800 Message-Id: <20230428070005.41192-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764402865838288704?= X-GMAIL-MSGID: =?utf-8?q?1764402865838288704?= Convert platform_get_resource(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li --- drivers/clk/sifive/sifive-prci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c index 916d2fc28b9c..e317f3454e93 100644 --- a/drivers/clk/sifive/sifive-prci.c +++ b/drivers/clk/sifive/sifive-prci.c @@ -567,7 +567,6 @@ static int __prci_register_clocks(struct device *dev, struct __prci_data *pd, static int sifive_prci_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct __prci_data *pd; const struct prci_clk_desc *desc; int r; @@ -578,8 +577,7 @@ static int sifive_prci_probe(struct platform_device *pdev) if (!pd) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pd->va = devm_ioremap_resource(dev, res); + pd->va = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pd->va)) return PTR_ERR(pd->va);