Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1715611rwr; Fri, 28 Apr 2023 00:18:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Oz3wAQjG2LT1T3peEA2l3KmPx0j4jCw9nd2ZXPiVfStY17knrHAnanN4App5Kj/fNd/eg X-Received: by 2002:a05:6a20:9189:b0:f5:35f2:400c with SMTP id v9-20020a056a20918900b000f535f2400cmr10824558pzd.4.1682666313601; Fri, 28 Apr 2023 00:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682666313; cv=none; d=google.com; s=arc-20160816; b=fz8QOAt0lm/KBvmRuLl9gGTTXgutEImULWP6V1wp/HASf1rc0gwq1hTlhAI1Y0bHlz 9eHn871/MOoDryzc/34k7LqWR5yp1KQwPui2aJeOrVaCpL0hEqxr6ORYXqYxHuBa0JUy aKNherY0OaVYapvUbKhl3fZkNI3aBsJ08USmWXSq2FBiYOMril8YrWmJSSH3RVyhamW5 YAyCvP1VWXo5J9/LoOziYx/I7uX6PDHqscmXsccqlIDXhIWrAFyfCBvD+pmcMKDXlhkk 1srjFvX9onMgFd1sKzDPWv8V7AzXmSFv7uSU4/KHQ5RmkaXlaQLeZD7YxFn28xw/6N09 kkNg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oe4-20020a17090b394400b0024b9e5aa258si15013214pjb.0.2023.04.28.00.18.22; Fri, 28 Apr 2023 00:18:33 -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 S1345385AbjD1HAO (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 Content-Transfer-Encoding: 8bit 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 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); -- 2.20.1.7.g153144c