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 00D95C05027 for ; Fri, 10 Feb 2023 09:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231705AbjBJJYT (ORCPT ); Fri, 10 Feb 2023 04:24:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231402AbjBJJYR (ORCPT ); Fri, 10 Feb 2023 04:24:17 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C25C93773E for ; Fri, 10 Feb 2023 01:24:15 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4PCpG60gPDz4xpyD; Fri, 10 Feb 2023 17:24:14 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 31A9Nrtu090567; Fri, 10 Feb 2023 17:23:54 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Fri, 10 Feb 2023 17:23:56 +0800 (CST) Date: Fri, 10 Feb 2023 17:23:56 +0800 (CST) X-Zmail-TransId: 2af963e60d2c5b93241f X-Mailer: Zmail v1.0 Message-ID: <202302101723563685569@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , Subject: =?UTF-8?B?W1BBVENIIHYyXSBtdGQ6IHJhd25hbmQ6IG9yaW9uOiB1c2UgZGV2bV9wbGF0Zm9ybV9pb3JlbWFwX3Jlc291cmNlKCk=?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 31A9Nrtu090567 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E60D3E.000/4PCpG60gPDz4xpyD Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ye Xingchen 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: Ye Xingchen --- v1 -> v2 change devm_platform_get_and_ioremap_resource to devm_platform_ioremap_resource. Fix the double space in subject. drivers/mtd/nand/raw/orion_nand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/orion_nand.c b/drivers/mtd/nand/raw/orion_nand.c index 1bfecf502216..1bdcd544c3fa 100644 --- a/drivers/mtd/nand/raw/orion_nand.c +++ b/drivers/mtd/nand/raw/orion_nand.c @@ -102,7 +102,6 @@ static int __init orion_nand_probe(struct platform_device *pdev) struct mtd_info *mtd; struct nand_chip *nc; struct orion_nand_data *board; - struct resource *res; void __iomem *io_base; int ret = 0; u32 val = 0; @@ -119,8 +118,7 @@ static int __init orion_nand_probe(struct platform_device *pdev) info->controller.ops = &orion_nand_ops; nc->controller = &info->controller; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(&pdev->dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base); -- 2.25.1