From patchwork Wed Feb 8 02:45:16 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: 54153 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3214375wrn; Tue, 7 Feb 2023 18:52:28 -0800 (PST) X-Google-Smtp-Source: AK7set+hw6CB3LK7x7oCfwvP79swXkmtu1rN6L3QLd6x9Ysx3aj3+jg05C2cQzSyRExKSr/SCSvn X-Received: by 2002:a17:90a:ee42:b0:231:154a:110c with SMTP id bu2-20020a17090aee4200b00231154a110cmr197003pjb.19.1675824748174; Tue, 07 Feb 2023 18:52:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675824748; cv=none; d=google.com; s=arc-20160816; b=F4nnFmWenRd/+qXy3OqD/y0wNlKy4H2Mvv3A5K7ZCSS/rcvqUAOaNArl4olwQDHR7Z BexU4CNXotliZHEhAZdllhhYQoFWXjgvlLBXGb5Zf5n0zB1aotFLd76J4vjk0QrT8wG2 LVGZD7t+6Fjs9rB/BQatg/FPa9Uslpe2k9jwYwbyFY3P/LGGOvcHtc9nnR4MBR1NiidK LzMXp0QFHtKKFEQrbOHeJCUor/duw++Gg4z+yaNIMhIz85ybK9K0rklQ9hHawhfvmMA5 wZ7vVT8Omv4F5QpSuzfSYCRc9PHpA2gDqytuDbYF7gIqKNj2ucoUBl4c+wov0fdcjW5/ YLlw== 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=dynYc/6V5MrxIm2CuebUgS0tgb9UiVo82mtMQ3/vyLM=; b=FxsOw/RDF0hEDfjtk3cHDW0xdUtdQa6iZczeHs2AaAcmtaNOaChTemweLL1UGXPFsu vPqyJecGjmSqisN590CVBXTnXoMS0ye0nchO2L3pS3qKQCgTooqWccKJBHNUh+Xcpdzi HKW/gDoXSZdEiFccJPceMXFeS5jDaogFFF3OsDQcmPS5ojIAcqSxQHt6bPsahpurUh97 ugHpPBj9Bc2iZUttY3gK5roOkZq+CChAITr8R379w7ApfZmnKVNRVMHF367JKrvJnF+y z3AWApEgvZtrSW3a/rTME8VtkieIkIzJffmu8K4xd70397Ze+8jmEbJjM/w2ez1uveMs yiDw== 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 gp9-20020a17090adf0900b002309de71d03si728861pjb.70.2023.02.07.18.52.15; Tue, 07 Feb 2023 18:52:28 -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 S229565AbjBHCpg (ORCPT + 99 others); Tue, 7 Feb 2023 21:45:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbjBHCpe (ORCPT ); Tue, 7 Feb 2023 21:45:34 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E37742DF0; Tue, 7 Feb 2023 18:45:22 -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 4PBPVl5QFsz8R044; Wed, 8 Feb 2023 10:45:19 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl1.zte.com.cn with SMTP id 3182jFli062054; Wed, 8 Feb 2023 10:45:15 +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:45:16 +0800 (CST) Date: Wed, 8 Feb 2023 10:45:16 +0800 (CST) X-Zmail-TransId: 2af963e30cbc11603596 X-Mailer: Zmail v1.0 Message-ID: <202302081045168463601@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?utf-8?b?W1BBVENIXSBNSVBTOiBsYW50aXE6IHh3YXk6IFVzZcKgZGV2bV9wbGF0?= =?utf-8?b?Zm9ybV9nZXRfYW5kX2lvcmVtYXBfcmVzb3VyY2UoKQ==?= X-MAIL: mse-fl1.zte.com.cn 3182jFli062054 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63E30CBF.000 by FangMail milter! X-FangMail-Envelope: 1675824319/4PBPVl5QFsz8R044/63E30CBF.000/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E30CBF.000/4PBPVl5QFsz8R044 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, 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?1757229611177887943?= X-GMAIL-MSGID: =?utf-8?q?1757229611177887943?= 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/lantiq/xway/dcdc.c | 5 +---- arch/mips/lantiq/xway/dma.c | 4 +--- arch/mips/lantiq/xway/gptu.c | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/arch/mips/lantiq/xway/dcdc.c b/arch/mips/lantiq/xway/dcdc.c index 4960bee0a99d..96199966a350 100644 --- a/arch/mips/lantiq/xway/dcdc.c +++ b/arch/mips/lantiq/xway/dcdc.c @@ -22,10 +22,7 @@ static void __iomem *dcdc_membase; static int dcdc_probe(struct platform_device *pdev) { - struct resource *res; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dcdc_membase = devm_ioremap_resource(&pdev->dev, res); + dcdc_membase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(dcdc_membase)) return PTR_ERR(dcdc_membase); diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c index f8eedeb15f18..934ac72937e5 100644 --- a/arch/mips/lantiq/xway/dma.c +++ b/arch/mips/lantiq/xway/dma.c @@ -239,12 +239,10 @@ static int ltq_dma_init(struct platform_device *pdev) { struct clk *clk; - struct resource *res; unsigned int id, nchannels; int i; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ltq_dma_membase = devm_ioremap_resource(&pdev->dev, res); + ltq_dma_membase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(ltq_dma_membase)) panic("Failed to remap dma resource"); diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c index 200fe9ff641d..a492b1eb1925 100644 --- a/arch/mips/lantiq/xway/gptu.c +++ b/arch/mips/lantiq/xway/gptu.c @@ -136,17 +136,14 @@ static inline void clkdev_add_gptu(struct device *dev, const char *con, static int gptu_probe(struct platform_device *pdev) { struct clk *clk; - struct resource *res; if (of_irq_to_resource_table(pdev->dev.of_node, irqres, 6) != 6) { dev_err(&pdev->dev, "Failed to get IRQ list\n"); return -EINVAL; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - /* remap gptu register range */ - gptu_membase = devm_ioremap_resource(&pdev->dev, res); + gptu_membase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(gptu_membase)) return PTR_ERR(gptu_membase);