From patchwork Wed Nov 30 07:37:36 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: 27617 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp781971wrr; Tue, 29 Nov 2022 23:42:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Emb0DyG6MctjYs1LEJCp3DiPreo2CNH03K2McltlMw+6RZcBuISqWOASO5OuLZRSGA50Q X-Received: by 2002:a17:906:bcda:b0:7c0:80b0:7f67 with SMTP id lw26-20020a170906bcda00b007c080b07f67mr7871758ejb.462.1669794158070; Tue, 29 Nov 2022 23:42:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669794158; cv=none; d=google.com; s=arc-20160816; b=i8BZpL+QFhF0/Zxk2lIoYBamE0AdUquAwURq99FNBhSTAQLJcHscns/26iA3dIJV+9 VCqVaUTr5nQq3g8ZmgoB2oHeTikGTndCRuEXhvfiDPWVOEJRIrpKJ/9xZo/MChDI0NbC KjeEcdM/U2eNKZa/jwwIO/N3SrSCbbN9NwxnvdIhet5CMKKpG5wPuZIPfidg0CBSk8lo TgfbpHUiD/exw9/DWLgHt27IIsExgvmjgoYcXkgVziSNUosNqsONDMjtXq8K3nGWvDsl +5YUBFnkdxPo/F9w79YfiBwbZhtrP2XH/w0pw08tj1pB6od8Nkbk8wY7l8OSEOopeQKk blkA== 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=ogV7/RDNdl+RX/jyko5Yd6BB3H8pipBqQeDKkLCxe4g=; b=GSK47xKu5WzHJ3wGV4aDIKkk5jJEq/sifhAg9l+6sULjznmaEYo+izpSLRrRQKzKiW 3XtfAMJn0InE+tSgZR0iepnXRsfIrgxHDvqDgPjNoRJAJ6dX+lcCfxBE4OMGh5estDXh e2FaGWRvJYrfjckCHfCbXU8V5gTcAZwEt246DrRZzULcKs8vdQ6T0KFV2xfhGLLKBvI3 1ZG+YI9FYWLsXJsOh6jJy/6T9cAXgkZo09wUJd6TE1n9fB99TdjmBqqL02p9RdFzAkoh KUTWBRRJQERwCP3NitsU08Tz203Es3/+/pXMu/NCxI/MReMnOstUhvLnBzMyHqsC5PUC sckw== 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 ga33-20020a1709070c2100b00769d94690fesi831620ejc.326.2022.11.29.23.42.12; Tue, 29 Nov 2022 23:42:38 -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 S234082AbiK3Hhq (ORCPT + 99 others); Wed, 30 Nov 2022 02:37:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233595AbiK3Hhp (ORCPT ); Wed, 30 Nov 2022 02:37:45 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6F446417 for ; Tue, 29 Nov 2022 23:37:43 -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 mxct.zte.com.cn (FangMail) with ESMTPS id 4NMWJP48hKz4y0tv; Wed, 30 Nov 2022 15:37:41 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AU7bYFC084520; Wed, 30 Nov 2022 15:37:35 +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:37:36 +0800 (CST) Date: Wed, 30 Nov 2022 15:37:36 +0800 (CST) X-Zmail-TransId: 2af9638708407bc45ebb X-Mailer: Zmail v1.0 Message-ID: <202211301537369277960@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , Subject: =?utf-8?q?=5BPATCH_linux-next=5D_ARM=3A_PXA=3A_use_devm=5Fplatform?= =?utf-8?q?=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AU7bYFC084520 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 63870845.000 by FangMail milter! X-FangMail-Envelope: 1669793861/4NMWJP48hKz4y0tv/63870845.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63870845.000/4NMWJP48hKz4y0tv 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?1750906078710809969?= X-GMAIL-MSGID: =?utf-8?q?1750906078710809969?= 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/arm/mach-pxa/pxa_cplds_irqs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.15.2 diff --git a/arch/arm/mach-pxa/pxa_cplds_irqs.c b/arch/arm/mach-pxa/pxa_cplds_irqs.c index eda5a47d7fbb..e94b340589ed 100644 --- a/arch/arm/mach-pxa/pxa_cplds_irqs.c +++ b/arch/arm/mach-pxa/pxa_cplds_irqs.c @@ -104,7 +104,6 @@ static int cplds_resume(struct platform_device *pdev) static int cplds_probe(struct platform_device *pdev) { - struct resource *res; struct cplds *fpga; int ret; int base_irq; @@ -127,8 +126,7 @@ static int cplds_probe(struct platform_device *pdev) return ret; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - fpga->base = devm_ioremap_resource(&pdev->dev, res); + fpga->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(fpga->base)) return PTR_ERR(fpga->base);