Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp873641pxb; Wed, 1 Sep 2021 11:49:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzphNOUiHTjMBbm/z75l1UCACRCBmmnuIHJ/chZG7tu0xYu9nGWhJEzSkxm1dBVYJsD8z/K X-Received: by 2002:a92:c887:: with SMTP id w7mr668856ilo.129.1630522160175; Wed, 01 Sep 2021 11:49:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522160; cv=none; d=google.com; s=arc-20160816; b=g5JQmJMI+IlAzmlyc5EDq3KTyLnRIg/zfuWZ1iY34XFMLhdeI2yoBqxMXz9h/5BYEV L9Q4r2bJAWf5BaNFQtMENCMHzx0UPwzqpLC8Lo9TY14UgwcBiDMmnC7HhSW4qIMbX/bf rUPD5dxtu5AUpiWIHBUweQJcjP1gXCxVSATsn8uL2ZNJb3+CBxF6p2GfvPxXbZPb80vP yumiDy6iSIOZHjk/tbxRgrvwsv/9UBCm2tnjg/rRz9hG3GOYmjUGXPkjm1+/4pUqspty GHLL7R9nuvf8h7n1J9v0pFHxDmMF1usYSLyLEV6ocrBlC+nG7t4sNgSldi6XqZn/9WJ6 Bz7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=LgsGU5jl3U6ePsZxdCY3z4de6UqKkeicoycaMieB510=; b=YtpxWmj8xa3XoQSdr10FO2RzAPBGiwXmweqUWed6CnTAOjgli4WraWSNUHIyKqQivt B8zdAQU03ZOVP93ZeIr/hbuJ9Tz6Iufg8yY7omCksp00gBA2cYHUU3S9jjZmb7SD1BxN hhJ8ZAOctSjVaiktPnZp8NY5kZx2dJMmT+FCQtTOXK02CKD7qae/P0rIim8Hh1yDfu6o AqkOsS5Nmn9EwCR4p/pj04qw0JNpgDZqcgtjhy4XjJCHXy7kq3QSXF0oohGE6Deyf9QB hgcH6/uAsqYg2Fbkm7rweUftpLvcp/eH3rdypAn5zLkAzGQkfQZy4S47kX5Tha+6xNz8 5Vwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g4si216999jab.37.2021.09.01.11.49.09; Wed, 01 Sep 2021 11:49:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242697AbhIAHmg (ORCPT + 99 others); Wed, 1 Sep 2021 03:42:36 -0400 Received: from mx21.baidu.com ([220.181.3.85]:53276 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242735AbhIAHme (ORCPT ); Wed, 1 Sep 2021 03:42:34 -0400 Received: from BJHW-Mail-Ex10.internal.baidu.com (unknown [10.127.64.33]) by Forcepoint Email with ESMTPS id 2874DA8FAD28FD120ABC; Wed, 1 Sep 2021 15:41:37 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex10.internal.baidu.com (10.127.64.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 1 Sep 2021 15:41:36 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 1 Sep 2021 15:41:36 +0800 From: Cai Huoqing To: CC: Han Xu , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , , Subject: [PATCH] mtd: rawnand: gpmi: Make use of the helper function devm_platform_ioremap_resource_byname() Date: Wed, 1 Sep 2021 15:41:30 +0800 Message-ID: <20210901074130.9083-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex07.internal.baidu.com (10.127.64.17) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex10_2021-09-01 15:41:37:111 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c index 4d08e4ab5c1b..10cc71829dcb 100644 --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c @@ -951,11 +951,9 @@ static int acquire_register_block(struct gpmi_nand_data *this, { struct platform_device *pdev = this->pdev; struct resources *res = &this->resources; - struct resource *r; void __iomem *p; - r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name); - p = devm_ioremap_resource(&pdev->dev, r); + p = devm_platform_ioremap_resource_byname(pdev, res_name); if (IS_ERR(p)) return PTR_ERR(p); -- 2.25.1