From patchwork Fri Jul 7 09:55:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13304679 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CBF33C001B0 for ; Fri, 7 Jul 2023 09:56:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xXrrfxmvEdTpfAI+zCkruu5rbL/QGe9YJ8jFKdD7KrQ=; b=5E7XV93iATM4Tb aQ276JVOLU6pRoPk7sAFX3jTx5tRV9IHTcv8S5z/Q5kKeoHfI0Ls4Bl6JlUjAlRh53ZOGXYnU5ZF6 WfKno8c6ibF0vVbkhdJM9WQQRfNraq83ejdnAPnS35vC2rO9VyXbZbrKXaBDGgRkY7sI4EMaxi/7T XxhzTSLTVM4c0kP4ltuPvo+E+lGuILbnt9Fl629ZguQdISbxlM6xUNUecaA0h0OCFmRzkzW5LpCTf HW/cIDBIWEPPXRpEFp5QIn2mV9KcA+SXAt3pS67EezkIjehJdBB161e+/rPiMdHUu8No8PhhyRLIL PZsjba/5rh9xKVzT34Ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHiCB-004CPM-1b; Fri, 07 Jul 2023 09:56:11 +0000 Received: from mail-psaapc01on2072f.outbound.protection.outlook.com ([2a01:111:f400:feae::72f] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHiC8-004CLN-0B for linux-arm-kernel@lists.infradead.org; Fri, 07 Jul 2023 09:56:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AJxgtZMvE9bAmvEqmWJceX7LjCDHLVz5YO2peFR2s6pSlPSzkR1ThZf/GsWQJT2GU+ytN/RdSX2kuiwbJUk1HiHlE12YQni5OxViJo/+kRoQqaQLbyztLHfDTPx2IsPLhGzDa9HLaCCbvO4aqt4OSbAnMXCjZ12kQqfSwP/LTimkysWm/j6VTbZwhvixxQoQCkUyDr4xqur2JzyHzjDyyR9Jy4Cib2ysZgE8nrqBE7tobtBU/obbGae8e4f1pv0bt9FghWBaJVOeqLqddFXQP8ZG1pOWci0FkGOXYPnuOh5eeJtvg75lud3JFovreqW8OWrBrODG9vMYNhrRM+NeJA== 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=mtVYOYMZOlBwAc8uttTTZ1VtrI2xEPdSeZsb4KYuxuQ=; b=a0GGTJdLdzjaYt30luFHdDMwsmef84l32SfHfD/h7WU89O/yc9YfJvFqWKlO/wq7HVDY6ZgeeWmJAHe0OeXbMUJv9HBzVdG7ATEMNv+AKr+anE8cL1921lR0tLEOkz2NGT3ohKW/Fqr1JlaD2QE0EASuEQG9Nd5QMwpzsgs5iYTFDmUNtEM3EcTz/ebrenGR6vv+i+CJnJ5hoVV5YqhvT7+Tx9Cz1uAedJf2IbXNlaQ2RqZ639fhYfuNQ+aXVCXQHwUrfk98p0tm8snuwZCwPOcaKvJPOZeUmWyW7gwXBZPCb9z3MrPd9+gQ6wIV3WCfHg2gG2n4IZ5qziO68zcAyA== 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=mtVYOYMZOlBwAc8uttTTZ1VtrI2xEPdSeZsb4KYuxuQ=; b=SWS6O2xBaHf6tAvHlq+kXp3KFzgrzVwHSA5ZUiQuJiqg2X7eYBd79EGOlO2Xs8l1hKqGGPnLIqjTN5mBDLCUfPrB0XGOW5POIRGUvM41wjHc+uGgUjNicZNuCwogJuYZSPO/Qu39/sgs4KMGF85nUv8CiKRUEgSFNHfMbHnKiS6x7/VWP1OngNVwBjLJbLd4m2dOm90+4yyB040Irqr/upGNgLg+qfFvwlwZKPtolzfUOJ8RDLQn68piiAUxKUKR/tfBWAUXlLNX4bCmSFy/Pdyqumee0h0XCGKYqcRczjmXQt2Mm3oImxbzp571nfAUIfD4gBsVx7qSVRlcyZtYrg== 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 KL1PR0601MB4356.apcprd06.prod.outlook.com (2603:1096:820:6d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Fri, 7 Jul 2023 09:55:46 +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.025; Fri, 7 Jul 2023 09:55:46 +0000 From: Yangtao Li To: Sergey Shtylyov , Damien Le Moal , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , linux-ide@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 11/11] ata: pata_imx: Use devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 17:55:13 +0800 Message-Id: <20230707095513.64224-11-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707095513.64224-1-frank.li@vivo.com> References: <20230707095513.64224-1-frank.li@vivo.com> X-ClientProxiedBy: SI2P153CA0004.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::23) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4356:EE_ X-MS-Office365-Filtering-Correlation-Id: ce2fc700-1556-424a-5d29-08db7ed055da X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +qHkd5zB70sqjE0QCFEv0slivRWyzWI9XPKDxJRftuSdYbS/YrL8y3Cd0VtdiEI0bMU2zSlRHdkzd4y+KKFn2nPnf6NuQ0Q+nGbf/I/IFG1TDEKuT3Yp/bnP0vu8TJ2P+Z89RL8sbaPIV9JvpulzCL9wz9rD5nRgYav3cCATdhdxDcHpcrn8I71R1vhGcJTyqJTR0daA9kE1JzEbBP/ExzBb+mqU3vKimzSUN4iQH03KFwqU2lYeI3nrAL7xtc7GZYAj5mX6mxIdH8bimyWvhDJNRZz1fJrUsG8ddPeNOyVfJc8bTQHls2M3VfgcWdiMfUVxYFvTpItts+mKO5kIakcoHWR2DaX7CXrHJ//P5qB8Fvbf9m2SwvEgOOf09XAiqZPEvSOSaI5crE7MNoLqy/oIQL/jy0jNT7llOGK7cDHoZu0JQdlIbAZRPMtNJMnn1JthYYoS6hmaDjYgszjFidHiHObkkgAnPKqaSt4qNLlJcrZffqX5j28PTlZ7sban4DXj7IOKZiC8Vf2VKAcXOnliNQ50VV40d6OsgJky4h9/mdpKmzSC8UJxE0IMzlT772byqqb1LDUMzK2WLoipveJgPLdWe19bHz4n5kInROvSKuKqe9VJ4soWnBCsdtEV 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)(136003)(39860400002)(346002)(376002)(396003)(451199021)(38350700002)(38100700002)(2616005)(186003)(6506007)(26005)(7416002)(4744005)(41300700001)(8936002)(5660300002)(66476007)(6486002)(2906002)(52116002)(36756003)(86362001)(110136005)(316002)(66946007)(1076003)(6666004)(6512007)(478600001)(83380400001)(66556008)(4326008)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QPTdjDEbOnbDpgaZoSRhJa2Oe1Snk4UFJPLavdSpqVUZKmJXIceQK3cQ6hOx2Y3GQDgdcjwXEYx0Ia2vCZdkw07mLPUJEIkGkQiWqcuZw1GK8Hn3dW5CjmbOh+czjIzv72GR3p2e+0F14DV7G5SuzdB3Iy0KZDNoqmH6nRA2zYFUyOkBrZfAMQm3SGaI/xyqU2RJRho+saMp+e0o+yRritEaONxAeJXHeUNnpd3sKd74kmYix/pxwSmZfkIByzivWOnpln+2g6jxg3aoDi3vjAqOHtZ1PfyjTz9IJqqRv2Vs/DNT8EAirA0qZNMjqdGSOA9v641eDJkW5u9cSfxmwbSUnX9Xl7cl/daE9CItsDpgKcdbo2T5+04R64xe2NuOJiUI4YGXZuZIIuULnkfKJdFVoa2yXcAHejeiNS2jRE42yP15B5/D2I5IVghnZThR2TU7BVNSubyH98EfQVC9W1an3CtJ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bqboz/ez/47LQWKVDP1uYKPPkxgqcSTpSejBzOk36lt X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce2fc700-1556-424a-5d29-08db7ed055da X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 09:55:46.5908 (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: YymNMHZu2lQxwqdbK/Fp83y5GtQ3Ml0XCoAA0wPX3bZcE3Xgl9UuuOGXcoSAgQu36XGg+cZjysT8ftWgtF6tjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4356 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230707_025608_099077_5E818D7A X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c index 4013f28679a9..65d09ec94c12 100644 --- a/drivers/ata/pata_imx.c +++ b/drivers/ata/pata_imx.c @@ -164,8 +164,7 @@ static int pata_imx_probe(struct platform_device *pdev) ap->pio_mask = ATA_PIO4; ap->flags |= ATA_FLAG_SLAVE_POSS; - io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->host_regs = devm_ioremap_resource(&pdev->dev, io_res); + priv->host_regs = devm_platform_get_and_ioremap_resource(pdev, 0, &io_res); if (IS_ERR(priv->host_regs)) { ret = PTR_ERR(priv->host_regs); goto err;