From patchwork Wed Nov 30 07:49:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhang.songyi@zte.com.cn X-Patchwork-Id: 27619 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp785105wrr; Tue, 29 Nov 2022 23:52:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf6KX6XtPVvCR+/Cfvh063Z4Qq76rbRBZ94u344NWn2X6mgbe7Z7aoYDXwS9jV1+DVdEJz8F X-Received: by 2002:a17:906:3604:b0:78d:99a0:7cf6 with SMTP id q4-20020a170906360400b0078d99a07cf6mr50155829ejb.56.1669794727664; Tue, 29 Nov 2022 23:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669794727; cv=none; d=google.com; s=arc-20160816; b=UMd44fBZ+6CIqPhFBz44UQ9LxcTyedVbSepMNY25kBfnho7uFgfKX/x2IsbY6HGZlp ljeKgLS6VejAz4xuKnLtY7ojrZZZAno+5/vY3tTioEFbUmfOsZj9vYsDRnGNZ4oqYOWw SSQempQBuw52QvM4FA5CjmUR/bqsoDkV8sQW5+fbX+twoAgGQT1SokV783Wu5w1XioK7 EUui0RGY0lyauagEt06Rra8809+w8N1j+2noKNhIHNCOC4iFh4bbmjPGw+B1X0Tk+weg eurMmalvQoRAzlxdtUd+Yt1bhg130JFkAWaOjKi7xNAc9KDWccgAKmcOi6KC79WZZaTl g5qg== 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=ngJhYXAItFi5k+44YFc1Zy6kuDqj5flARUO0Iyv6g6g=; b=mezrmfLuVwS4F6qGDFybAWD2P0Bwr77xC0WYdqyUapN7HHyzkidfymh/Tfy/1ToFnt 6yfNuEbtycz5jlCgAQ4nX2XIMjXX1T9M/uwjWGqlfn4Q2zwGgBlYBTd/EUgEdA0DYLb4 oYaHss5kPcaYDNCZcm9HMe86nfXpvw8cP4UPXY27i7px0yiLipMwYx5q0xpQJM+iJeeE svnsFGqQWqk8pSTzVfwUQgMRYdqHhRcSgzFftxWc4dPetKQEyz3WGrfi0rfyR4A8an7D QWlAX9sQRqKJd5SMjSpQXE59IiBqzDlx5/PUMMStABAavA48Y1U8vYnH/5YJ488ka1dP zpUQ== 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 lg15-20020a170906f88f00b007a072b8240csi518973ejb.927.2022.11.29.23.51.42; Tue, 29 Nov 2022 23:52:07 -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 S234157AbiK3Ht6 (ORCPT + 99 others); Wed, 30 Nov 2022 02:49:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232267AbiK3Ht5 (ORCPT ); Wed, 30 Nov 2022 02:49:57 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4DEB3137C; Tue, 29 Nov 2022 23:49:56 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (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 4NMWZW2np9z8RTZJ; Wed, 30 Nov 2022 15:49:55 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AU7nkM6099628; Wed, 30 Nov 2022 15:49:46 +0800 (+08) (envelope-from zhang.songyi@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 30 Nov 2022 15:49:47 +0800 (CST) Date: Wed, 30 Nov 2022 15:49:47 +0800 (CST) X-Zmail-TransId: 2af963870b1bffffffffc9b60380 X-Mailer: Zmail v1.0 Message-ID: <202211301549476468260@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?utf-8?q?=5BPATCH_linux-next=5D_mips/pci=3A_use_devm=5Fplatform=5F?= =?utf-8?q?ioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AU7nkM6099628 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63870B23.000 by FangMail milter! X-FangMail-Envelope: 1669794595/4NMWZW2np9z8RTZJ/63870B23.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63870B23.000/4NMWZW2np9z8RTZJ 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?1750906676535367913?= X-GMAIL-MSGID: =?utf-8?q?1750906676535367913?= From: zhang songyi Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: zhang songyi --- arch/mips/pci/pci-rt3883.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.15.2 diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c index e07ae098bdd8..d59888aaed81 100644 --- a/arch/mips/pci/pci-rt3883.c +++ b/arch/mips/pci/pci-rt3883.c @@ -404,7 +404,6 @@ static int rt3883_pci_probe(struct platform_device *pdev) struct rt3883_pci_controller *rpc; struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - struct resource *res; struct device_node *child; u32 val; int err; @@ -414,8 +413,7 @@ static int rt3883_pci_probe(struct platform_device *pdev) if (!rpc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rpc->base = devm_ioremap_resource(dev, res); + rpc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rpc->base)) return PTR_ERR(rpc->base);