From patchwork Wed Jul 5 09:46:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13301918 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C120DC001B0 for ; Wed, 5 Jul 2023 09:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229871AbjGEJtQ (ORCPT ); Wed, 5 Jul 2023 05:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232317AbjGEJrr (ORCPT ); Wed, 5 Jul 2023 05:47:47 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2108.outbound.protection.outlook.com [40.107.255.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46CBD1FD3; Wed, 5 Jul 2023 02:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dLy/abkUOrkNlaB/k/hgcrMeQqUpQsM68MveAGGE1LUOImBCQ2IMMILRMHt2QxTdUyhrxpcTyCg2gVmHbouDFNq40uiXdAS3wWbSEM7uCDX2BjIaYPbOLFkGuI54OTbnqB2JufVYp4ovrobOYQZ738KZEEBOsYxDwq4/eHtTqtlf8HeDIlu2qHh18Qd3FJcTD8RY/WgMd8UTsGnYBJ4cyvNCywjTcEPFCFqZbpoPGrbeXzsNH8KFyF79GeFyREav6RclylDjmmtfv5/6ncelSIeiCcpD+ZmU42NiPrisH2K6oXyZz13mJxSUJDT8tnFGvUFV3N0USQ6lRba4nrWXSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZjOm6UAG4W2jD5ACWQU6e6juSINzxVbwn97et2nkctI=; b=OhLahqgIha3dMuXYe3GCf+fNj43tt3Shatbn5num1Gd/o7bjlTz9GtdLExsB5kDc/WZvJAb65ScGbVpaRM8aPb59zN0OSME2FVIQuRzUvU5C4+DE5+7pZx1HYZ/stjOguPgnK9lNeHfYPrareX3JjH/3ezpP9cRnxAKIXMk4z0EMIgWAtCBFI70YjtOsf88itTraUaxROY8ZD+sDv/QokA5aDq3LfARFSJ1YE2/e2SSUu5cevO+mVEmhVmLrlVpQ1mXHQUeO2j4z2xNWS+FaoZOglB2VWFglXn3w0KxyBooTstnLB3vI5nlyrScgCffAKYgcM8MUCiC9VmkO8mrfMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZjOm6UAG4W2jD5ACWQU6e6juSINzxVbwn97et2nkctI=; b=BSnzHxV9p1LzYiI8IrUqmQipF1pRkO23rdtLe/8tVC/N8Mjf/g2kvwlc1E4DWV8BqGfKbypIH49jr5XJ/AyWBWW5Sm6Id6fi2F0Oo+t6+aA+6WWw3PRI0HGB+ELDrDUN+QC5jn22Uxj7hcqL9WRnGExCByHIZrhXLHdBnTqAigg7/SAr8R2UHpzpibm3wstLhpaGRXotyZTrSC6+ZZEGBhslYrbGI3UXrMXGpGj4nJXRjMsAI4WIoDjT3XzqHasP0LaoU7Hexb0THB2AL7XdQHHn0DS/okrq3kgXS+bsZBbxI9aJJsq1H/cQ8192kwndoFIEGOF2qAxFsfkgfD4Z/Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYUPR06MB6219.apcprd06.prod.outlook.com (2603:1096:400:352::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 09:47:19 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Wed, 5 Jul 2023 09:47:19 +0000 From: Yangtao Li To: Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix , Michal Simek Cc: Yangtao Li , linux-fpga@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/8] fpga: zynq-fpga: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 17:46:55 +0800 Message-Id: <20230705094655.44753-8-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705094655.44753-1-frank.li@vivo.com> References: <20230705094655.44753-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR06CA0203.apcprd06.prod.outlook.com (2603:1096:4:1::35) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYUPR06MB6219:EE_ X-MS-Office365-Filtering-Correlation-Id: 23b25d1b-3efa-46af-e538-08db7d3cd2ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oqu5Bb7J9kuNH49tDirhm39Ay58Dz6gtO+PobEio3Kf4sc0HGiXlqWY4Z+X/hhdQSOiURV1Vvexcs4vE5ookCsCS8N2yaRS4xS3/do+ntjg1Y0l+n7uA/Vj+wAKaj8iSfgWfYFKoebi40WYgPI4TUzckQz6pWU7E2b/yQKG2CyHsz9mlCaHNYIhxprVWmsJJfkg7rhcCKipk++rnd/Ex38zBOQtxDPDwR5HR5SLWQNt/yOw+GW4kKl98RGB8qgTz53ltpYK1q/CY4fTPiRL9d8aJkjRJbES8kWuUCYf/99tVYaKBO15QMZgUkgxQ4ZP5Vg0NHs1QIfxbXJHdZ3VUr8SZMLJmpcibnkBs4AlrY52dLOgdO8rSSyw6RGm+kMeVWFbtPtUL8H4DJ2QuHUK6drkEEF93GE6zhDxxZWHEgWpXJ/G7+57XyqJFv8jpaBPxDtxQAEWJdvnXmoFG5UCBFjoP6JimMo/FIR72OLRP+hTFaS5a2MT4KS4/s0rj/2nQ6q1FfKUGcW9aOeo0+YxeruORu+TWEH2ltfyxFCimfq63mcJikchO/M5VOesItebuZBQwlPiet6uMQlF8xGxAlQTJRaosO1TDjNCL1kBncupDiruK2cOhJ7U2nT2ZZsN4 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(346002)(376002)(396003)(136003)(39860400002)(451199021)(4326008)(316002)(86362001)(186003)(66556008)(66946007)(26005)(66476007)(6512007)(6506007)(1076003)(83380400001)(2616005)(4744005)(2906002)(6486002)(38100700002)(6666004)(52116002)(38350700002)(5660300002)(478600001)(8676002)(110136005)(8936002)(41300700001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CjsGwhFSKNfwkkGbGFMcml4gCxzQUF6KlmQJK6isLZmL1md0DVH/O+3jlPiKg3PfGZLWT3gL1EmCYSl3HOUKocUIMqZZolCl/F3yfkRGz+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HjVuqMvqebPPDJBpAQtyBGok6i7sPhXjYdnSSk0ql6qD7/O3csirzM4dK6qb1+Zia5iQ1ThTW5ELgD9+p0QnXVjbiYA1VdqZnl5TQl/96m31cFYoi43p9cq/CP7OwDBXeeYOYNMuKa6EEjpYbYDiMBKxjkmvEp5HuJ2rW9CzZ+MDWC3Xe0LmNT7bFvZ2n/pLEpaPomVPnm1u8JZ3UAhBgqrCyqWORhduyZofBxUaPaVyUKnY+wInyYjSQWXwVdLZwxbd1E8H3CC9vfVivBeO6HmVmOROqpn/NQXCdxgkbrlxbVhHLSM5iXKeQ2YKuwBE/ULjoVO/HLOmRGyqL4Vrfm7zNoZRtBOzr4MtkbRr3WyfoloUAJSUmA95l3Pm1xlSfY5RLrhkGo3lPLT1Dg X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23b25d1b-3efa-46af-e538-08db7d3cd2ce X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 09:47:19.3292 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i8UexYpLTS1QQKFxOYCJlG/YtJU3o8s1VM06iGPEBq4L/j9Q6xxxYY1vgCCs4YYyHyDwgtyIhDYjIlEnhG490g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6219 Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Michal Simek Acked-by: Xu Yilun --- 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 f8214cae9b6e..96611d424a10 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);