From patchwork Thu Apr 6 02:34:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 80035 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp729259vqo; Wed, 5 Apr 2023 19:45:15 -0700 (PDT) X-Google-Smtp-Source: AKy350YdeWy7EWXLSFffTRcR2vxKxhQ2fbSgcPcTLUjs4x7NJrSk+o/TgLRjYL18q93pDckHmSvZ X-Received: by 2002:a17:90a:e7d2:b0:23d:294:6a5a with SMTP id kb18-20020a17090ae7d200b0023d02946a5amr4642619pjb.22.1680749115142; Wed, 05 Apr 2023 19:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680749115; cv=none; d=google.com; s=arc-20160816; b=FvXkfA5z3zYB/EFZrGWnxmhlNOrYgSqPCOhesPJQVgkWkSvUCkBrRtnhfcI6gFBcYU JSBUhaDs5VlQpJytSOYzbgmCogZ5DZJ/pfIJkVkIWFqmt5SK/iDwbSmTkBX4KBWqmS3J FKf0QrV1c6kamxw/8vLKp/1YNEjxnRAm7aAX40PEg3ZC5sxpwdL6CtFIvV7wYyU6wU41 xhrkfzHeDt1kEs5X0VYUjLa64wvHW178BefGakM/dXuXt5TyAmIF4Lf9X72F30LBKIEb x9gnda6V6UqneuNuCwjeZdo+5VV+MmYODzNqdVdvtUop2iouc9OI6IGqWudslOavz9ug 4kFw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=6iKzv0OhjPz389+MFkdhLQ7a1/pBmoGnk/onldxqj/k=; b=UxsVY8FDxZrAadzI9kjVW4g+tyu9FTeoSEjfGoJ2pzT3SYY6RNSg7B25nt++3T54hO 3P9vYGhYR0oPRJpJYbbkH0I4GKJi87jZNtu6H8jDCTQB6441omvw1DXTTEktLC3udmRM NboHSnB/Ryjlwaxdtsg4kzVNsYcNNHveCzQEhKhhDSYioxPqR+4iCcYOdNT4zrRqvOvp m2e0uibKHPcYywGHjAxyCQHMDRoNyByYaV9yEWynNBj7WSqwAcYatwE54VVzW6xTnxsE hoh4ZMvyKGLYSWiC87iKeMLbNY+qaP78fqazPb/fKPo6eEGrj7S0lTe1V1cr9NEanfHg DF5A== 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 lb16-20020a17090b4a5000b0023fcb58b0e0si173683pjb.162.2023.04.05.19.45.03; Wed, 05 Apr 2023 19:45: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 S234942AbjDFCfF (ORCPT + 99 others); Wed, 5 Apr 2023 22:35:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230527AbjDFCes (ORCPT ); Wed, 5 Apr 2023 22:34:48 -0400 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4917B5BA0; Wed, 5 Apr 2023 19:34:46 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R911e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VfR1kV0_1680748482; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VfR1kV0_1680748482) by smtp.aliyun-inc.com; Thu, 06 Apr 2023 10:34:43 +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 6/6] fpga: bridge: Use devm_platform_ioremap_resource() Date: Thu, 6 Apr 2023 10:34:32 +0800 Message-Id: <20230406023432.124792-6-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c In-Reply-To: <20230406023432.124792-1-yang.lee@linux.alibaba.com> References: <20230406023432.124792-1-yang.lee@linux.alibaba.com> MIME-Version: 1.0 X-Spam-Status: No, score=-8.0 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,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?1762393183936165238?= X-GMAIL-MSGID: =?utf-8?q?1762393183936165238?= 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/altera-freeze-bridge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/fpga/altera-freeze-bridge.c b/drivers/fpga/altera-freeze-bridge.c index 445f4b011167..bb6b02ec2d21 100644 --- a/drivers/fpga/altera-freeze-bridge.c +++ b/drivers/fpga/altera-freeze-bridge.c @@ -213,14 +213,12 @@ static int altera_freeze_br_probe(struct platform_device *pdev) void __iomem *base_addr; struct altera_freeze_br_data *priv; struct fpga_bridge *br; - struct resource *res; u32 status, revision; if (!np) return -ENODEV; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base_addr = devm_ioremap_resource(dev, res); + base_addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base_addr)) return PTR_ERR(base_addr);