From patchwork Thu Apr 6 02:39:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 80032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp729070vqo; Wed, 5 Apr 2023 19:44:32 -0700 (PDT) X-Google-Smtp-Source: AKy350YZjekoIVq7e44TMV/vZFLly8BPjw6TQmCk8ackIoNrbeEyghSCzItwy0uCscctZkcPMBTM X-Received: by 2002:aa7:9a4b:0:b0:625:cc03:df34 with SMTP id x11-20020aa79a4b000000b00625cc03df34mr7823890pfj.1.1680749071739; Wed, 05 Apr 2023 19:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680749071; cv=none; d=google.com; s=arc-20160816; b=A4ccCpG+AKfSKSYfDWn26ClrjH/Vu0YvaRLVWbCaC6bNdXohxHIBbdW1rBbJ4EEMUV cG0o8ObucTY+Gs0PxnWa5DflDb7aocowR5cqax56TvDBULl+zfvRQXhFbP8mHojmvZx3 QqCQjU0EM/+lftfGsGudsbE9QMbQPN3kQZnaBVrHQAEv0R+0IJ0Ri9fP5wL+0btN0KTE y961AkvZjJ9BWA7gSTyx2nwrfeswtj7u9yc1iECR0+YLpxmH/jgN6r6NLKy+CceLhztI GqNFh7zuR93SA3lfEDbb/8xHNNnnzgqUxYwfWpDW6qpdNWfcuKstTT2FCNd29kgnqyxL XJYA== 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=ec6rb7hnzY50guvUlQf1E8dBFV8/CoBaG/LT+aq+JIs=; b=j1RTIarRsxW/3Y+5broyD/wJ5cSR/UmgxlapQ7b9q34nZ7dc81au6ELpcgFwA2+dT1 aMwXCM08o04oimYxgDfAFVJ3z8f+SJChdJro5F7zq1S17SfwbNHw+JgKv/ueMT77tVqo CdwXnCEdwrzCfxIiiH1rHgouS0LDiQ4MSc8cMP8K3F0zL3ZKgzechx83SO00zrt5sbpb 3aUoOdaMTbR+dtiCyJceExrHWRDmPBokRH6/oydR67KlDFtiBsjKTwErjViZvizOLADw FfMD3fvY+RxRX/IwQ5Fk/j98VlhjaNd9kv2MBbuPdSkSvezb8qLW5t3YoqvXCcKEeZHe 7VcQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020aa78f32000000b0062ae6345c66si190103pfr.385.2023.04.05.19.43.59; Wed, 05 Apr 2023 19:44:31 -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 S233641AbjDFCjK (ORCPT + 99 others); Wed, 5 Apr 2023 22:39:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjDFCjJ (ORCPT ); Wed, 5 Apr 2023 22:39:09 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BD891980; Wed, 5 Apr 2023 19:39:07 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VfR11DX_1680748743; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VfR11DX_1680748743) by smtp.aliyun-inc.com; Thu, 06 Apr 2023 10:39:04 +0800 From: Yang Li To: mdf@kernel.org Cc: hao.wu@intel.com, yilun.xu@intel.com, trix@redhat.com, michal.simek@xilinx.com, linux-fpga@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] fpga: zynq: Use devm_platform_ioremap_resource() Date: Thu, 6 Apr 2023 10:39:03 +0800 Message-Id: <20230406023903.131063-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-Spam-Status: No, score=-8.0 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=unavailable 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?1762393138292934789?= X-GMAIL-MSGID: =?utf-8?q?1762393138292934789?= 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/fpga/zynq-fpga.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c index ae0da361e6c6..b509da6b0604 100644 --- a/drivers/fpga/zynq-fpga.c +++ b/drivers/fpga/zynq-fpga.c @@ -555,7 +555,6 @@ static int zynq_fpga_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct zynq_fpga_priv *priv; struct fpga_manager *mgr; - struct resource *res; int err; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -563,8 +562,7 @@ static int zynq_fpga_probe(struct platform_device *pdev) return -ENOMEM; spin_lock_init(&priv->dma_lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->io_base = devm_ioremap_resource(dev, res); + priv->io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->io_base)) return PTR_ERR(priv->io_base);