From patchwork Thu Apr 6 02:34:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 80029 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp727064vqo; Wed, 5 Apr 2023 19:38:15 -0700 (PDT) X-Google-Smtp-Source: AKy350bNxAG1phZnyGKiiwX3EoHXm6+4ZiHL/knNqVWkUz9P6Dg+NgN6Ek9BSZH4os4evYH9RUgO X-Received: by 2002:aa7:ca55:0:b0:4fb:e9b8:ca5a with SMTP id j21-20020aa7ca55000000b004fbe9b8ca5amr3329450edt.40.1680748695697; Wed, 05 Apr 2023 19:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680748695; cv=none; d=google.com; s=arc-20160816; b=gBoiTBZBho/9PZrnUlE9tkh/Yr8+VwQ8x9uQGKJL8EMhFqzHQbfurbDDppxPRHLCNC l6dVmI5tFoJs2NzIdoFOelgdGpo6l2Gzf5OmPJUgr69DqMJAg6r4W1UcSb805EFOYfew hEYywZ36hIejmK7AMRKiriENn33U57XB0Gx3jaw/MkMOPc7SuK+yVyfHI4oRZnJT/eyq 0bUyWQKzeG1zhcw2F7bf/4Zo5ZLrflZ8gwFlU0CmK9Pq6XHslcW2lOHy1n+fZOuvOYpW d/b084vz8iPC2pgWyPgTvADWcuUcd6wWUX23ZuUK6zl3Z0RHmgfqO4cxKIohCHkDEtJE r4Xg== 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=BcC33GGvahulnMV3CUOlxzQ4OHdF0euUCEIl980ZWbE=; b=L375xmr5UtFQMwQTYwTp6f6OIM0s5yrPDmq0ACAdcFn0cSsed6x/IdsOcX8e53Rxgy WxACyUzk0jGST1mBL4GcTNhuPPmJsHx4rEpHBSUMGUzdFeaWHK7Tn9LxWkmNsvpLUK2v XuPCKjY40ddAHe5OKLIdWj6ZApco0nfDalzIbLa6CaNQ2+w31GeQqHxvnGuhiHjlVFgU JwqTQBmJHlkaULWhg6pJHet/JdJoXwPzdPwtZkfClLGj2w4zLxQMFOHSj4Kn9yDTfAVF 64cdgHGtKNuEPBEGe2ThyaBbXI7L7H6NDNnmaVnl4v1M9NMde/V6HwP29rEao98g5XAx wCaw== 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 e22-20020a50ec96000000b004fd29e75157si238248edr.343.2023.04.05.19.37.25; Wed, 05 Apr 2023 19:38:15 -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 S234192AbjDFCez (ORCPT + 99 others); Wed, 5 Apr 2023 22:34:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231232AbjDFCek (ORCPT ); Wed, 5 Apr 2023 22:34:40 -0400 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 682AC5BA0; Wed, 5 Apr 2023 19:34:37 -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=ay29a033018046060;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VfR2psz_1680748474; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VfR2psz_1680748474) by smtp.aliyun-inc.com; Thu, 06 Apr 2023 10:34:34 +0800 From: Yang Li To: mdf@kernel.org Cc: hao.wu@intel.com, yilun.xu@intel.com, trix@redhat.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next 1/6] fpga: manager: Use devm_platform_ioremap_resource() Date: Thu, 6 Apr 2023 10:34:27 +0800 Message-Id: <20230406023432.124792-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_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?1762392744450592630?= X-GMAIL-MSGID: =?utf-8?q?1762392744450592630?= 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/ts73xx-fpga.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/fpga/ts73xx-fpga.c b/drivers/fpga/ts73xx-fpga.c index 8e6e9c840d9d..4e1d2a4d3df4 100644 --- a/drivers/fpga/ts73xx-fpga.c +++ b/drivers/fpga/ts73xx-fpga.c @@ -103,7 +103,6 @@ static int ts73xx_fpga_probe(struct platform_device *pdev) struct device *kdev = &pdev->dev; struct ts73xx_fpga_priv *priv; struct fpga_manager *mgr; - struct resource *res; priv = devm_kzalloc(kdev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -111,8 +110,7 @@ static int ts73xx_fpga_probe(struct platform_device *pdev) priv->dev = kdev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->io_base = devm_ioremap_resource(kdev, res); + priv->io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->io_base)) return PTR_ERR(priv->io_base);