From patchwork Tue Nov 22 01:33:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 24104 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1941544wrr; Mon, 21 Nov 2022 17:34:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf4cODDBbLeTp6NBWaK8r94xvsCLaZo3adICNUfl0cXWoC5QUVlTBZ/0ak6F4RFdoMPkHZj5 X-Received: by 2002:a17:907:8b19:b0:7b5:3288:2cb with SMTP id sz25-20020a1709078b1900b007b5328802cbmr8523871ejc.638.1669080873395; Mon, 21 Nov 2022 17:34:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669080873; cv=none; d=google.com; s=arc-20160816; b=wnySyEk28wqC4cNpk6k7uGdw//hOoRbDi3HqcFRvfatfLNjrmGRpnUpxsWkpU3DwRu 8r9cb4kPaVX4IjgYLtE6Xqm4U5AvjYs00rntrz0S0NJh8M2DydyTcVABLurkxI/MmeVa dYqdjzEyhRzefCc+wJzy0qsTRalTgPXzzbbWa6DqsZYkAVzwVuEMFuzxaCS9uvO1cDnC CaRnuYjPiZ+yyNWAnoDeX0ZEYlAFNOozlfxmRzUIj95sN3FlBrqLa0Hhxg3QX9ZFJ+Vl OCA2pWzJqFwS0q7SOiGW9HFx5pxZVDqP7CxPsExvjkdb//tgd1cdJaFQMC10dynWdJUi 6gtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=7cDs7qFqme4HRTu2IFxzUP5mDfWlTKRe7NMmyv443ak=; b=gLq+ud6iYcoTGkc7InEWP/98l0FLUyTmDh3VNeqIAUWFs7BMAsDFwDz5FDePc0clsz a1Ezhb7pDdj7mkuU1+N7zYR/6WMbQuQUTxA8bBmOX78phzdsGGGWQgdHC9jl4ZJxVnTa Rdc/9ZmTO3jIqyO6CVuFgq+l1pg9xZfzjMyzS1JgM2a0aetz0YwAT5TDsdJORnPQeHF6 PVBkRCV3BDVJIuIlEWYotVp9xGgaR9gsXqEWOQvLXfKzCuK70mQAEKWVVFD4mCyeiE1Z CABBk1lVOT/p4pttphbPsHILNL/ykumgG/Umd4xxP9WG38BQsLgKW8KCUO4ptm/Tov5T ro1w== 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=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga5-20020a1709070c0500b0078a19032c70si12442249ejc.334.2022.11.21.17.34.09; Mon, 21 Nov 2022 17:34:33 -0800 (PST) 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=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232251AbiKVBdp (ORCPT + 99 others); Mon, 21 Nov 2022 20:33:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232241AbiKVBdk (ORCPT ); Mon, 21 Nov 2022 20:33:40 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C373E14D7 for ; Mon, 21 Nov 2022 17:33:39 -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 4NGRc15QtZz4y0v7; Tue, 22 Nov 2022 09:33:37 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AM1XQvS024917; Tue, 22 Nov 2022 09:33:26 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Tue, 22 Nov 2022 09:33:27 +0800 (CST) Date: Tue, 22 Nov 2022 09:33:27 +0800 (CST) X-Zmail-TransId: 2afa637c26e7ffffffffe8deadb2 X-Mailer: Zmail v1.0 Message-ID: <202211220933274886024@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , Subject: =?utf-8?q?=5BPATCH=5D_mtd=3A_rawnand=3A_orion=3A_use?= =?utf-8?q?_?= =?utf-8?q?_devm=5Fplatform=5Fget=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AM1XQvS024917 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 637C26F1.001 by FangMail milter! X-FangMail-Envelope: 1669080817/4NGRc15QtZz4y0v7/637C26F1.001/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 637C26F1.001/4NGRc15QtZz4y0v7 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham 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?1750158145603963215?= X-GMAIL-MSGID: =?utf-8?q?1750158145603963215?= From: Minghao Chi 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: Minghao Chi --- 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..00bd7be76e07 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_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(io_base)) return PTR_ERR(io_base);