From patchwork Wed Feb 8 02:49:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 54150 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3214055wrn; Tue, 7 Feb 2023 18:51:24 -0800 (PST) X-Google-Smtp-Source: AK7set8BwZi90905Yyy0aZQCG3KrE3xGapGNihbtLWRlXb+qic8R9F5YJg/weOkawjp3q22l/ZHf X-Received: by 2002:a17:902:e88e:b0:196:7c6d:2aee with SMTP id w14-20020a170902e88e00b001967c6d2aeemr6487275plg.11.1675824684030; Tue, 07 Feb 2023 18:51:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675824684; cv=none; d=google.com; s=arc-20160816; b=ruDwKTSIW29sDkwaE5fAdKvhskQ1CRYuUsV7RbXW4vptPfDtlBsEhhhUH8muCwq1aX Uk+TZw0h6KxJVgXYcISXqKBgeu68AetAeaCwdquz0PH0vQOvVlh+DmrsZd0j+vUn7ZqG ZTsQtwzwjUvMlL75TuRUOQ8qMyeFKZwZhWRnDqGoYDJMTGT+EStHsErZfM8UlUXywiz1 MbG2Qic4OO6bEe3HRwk+ERJfuJLUtrQ1W10qlq6E9HzTiC1R9owmUZLJgkj/hx5Fo5ZH OlmVMeatqMbpgHuJdT2ZJtpLbIqZXqTSNnYuy1DRODJ8yXfvPyTh4/iPSuniJLorKejg VarA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=StiT1Ttg0O7uMUjJOZ4GB/JqhGJWA2Q9GesQzMi7rW4=; b=n42Nt2C988RLe2vw1B06Io/gVTIt2pvxHM4y4hUKzJD93RQPSnqVCyKjOTYAtKtutq fEZIS3EBCRLrMb6kGWmrVaaBf8U1h48fWxZTIZAHLn0f12h0SHBViKElXnnARju5/IN+ moov48Cquqs0Wk2skXxpI2Zc+LkgZhXQ+8boftXjver+CuRfH9Xey3uPNLZMXHbYQNus 5OAjBYa9zaCaHf4uYcjDHhdKXMz35JKmWp0eceug8fF9sdywfhHQtozOei73J4GunQgS 7IoBAhZsY05fIIjsSZ9ScTuZJYwOE/H9Z0HZH/WGZYIYrkuWZpTbINB4PC742nppoM2m gcZQ== 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=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a63380c000000b004fb19a6cb9dsi2748652pga.71.2023.02.07.18.51.10; Tue, 07 Feb 2023 18:51:24 -0800 (PST) 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=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230140AbjBHCta (ORCPT + 99 others); Tue, 7 Feb 2023 21:49:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbjBHCt2 (ORCPT ); Tue, 7 Feb 2023 21:49:28 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2091410A91; Tue, 7 Feb 2023 18:49:27 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4PBPbT5Thsz6FK2S; Wed, 8 Feb 2023 10:49:25 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl1.zte.com.cn with SMTP id 3182nFtL065564; Wed, 8 Feb 2023 10:49:16 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 8 Feb 2023 10:49:17 +0800 (CST) Date: Wed, 8 Feb 2023 10:49:17 +0800 (CST) X-Zmail-TransId: 2af963e30dad60a0da80 X-Mailer: Zmail v1.0 Message-ID: <202302081049172703754@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , Subject: =?utf-8?q?=5BPATCH=5D_MIPS=3A_ralink=3A_Use_devm=5Fplatform=5Fget?= =?utf-8?q?=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl1.zte.com.cn 3182nFtL065564 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 63E30DB5.000 by FangMail milter! X-FangMail-Envelope: 1675824565/4PBPbT5Thsz6FK2S/63E30DB5.000/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E30DB5.000/4PBPbT5Thsz6FK2S X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY 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?1757229543400982090?= X-GMAIL-MSGID: =?utf-8?q?1757229543400982090?= From: Ye Xingchen Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen --- arch/mips/ralink/timer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/mips/ralink/timer.c b/arch/mips/ralink/timer.c index 652424d8ed51..fc503679a93d 100644 --- a/arch/mips/ralink/timer.c +++ b/arch/mips/ralink/timer.c @@ -95,7 +95,6 @@ static int rt_timer_enable(struct rt_timer *rt) static int rt_timer_probe(struct platform_device *pdev) { - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct rt_timer *rt; struct clk *clk; @@ -109,7 +108,7 @@ static int rt_timer_probe(struct platform_device *pdev) if (rt->irq < 0) return rt->irq; - rt->membase = devm_ioremap_resource(&pdev->dev, res); + rt->membase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(rt->membase)) return PTR_ERR(rt->membase);