Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp383191pxb; Wed, 1 Sep 2021 00:43:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7QejDR/8DFNitqMPjZAeWHwKjzEj1ohr/CyffYl8VwDR5y0R4MbP7LMMuXaAIQaRQIKEU X-Received: by 2002:a5e:9819:: with SMTP id s25mr26415083ioj.63.1630482183208; Wed, 01 Sep 2021 00:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630482183; cv=none; d=google.com; s=arc-20160816; b=oKkZQSqrWsMl+rGH7/kKHurw14oT+Q/0wpRgd4Gtgxx6OS5+dkzCxjArnd29FYOWce OHio/VUa2wy+2hhJPEAawLQAFAKwMx7M4cP8Msq3YuBe8DwV31N7Ohffbqc7uElIsSqz pJNsta7ND9smkdUelltBRfHNfW6WAUhRKQz2ik9bHpDUiqZrYw3HU6je0waAawLpRm7t Y70YZC41c2WYG9U3SCJrvpEOsjUh4dmBmQSqsYqBYpq/sLxS2hjEnsWha6e6X6xg5jFk jSHALkpcbw4Bo3wXFGUVbDsyUUZjwNinDlu1yS5S+snJYK2fmsFQuazCu7oOj772dnJA jAkQ== 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=Db4+RqGojS2NXpeFmXPcsm+tgYjAvM4Mj0FbabRjycw=; b=qyUAiwmsGk+Iyq0annTAiDK2U0xXziKZzqefaD3Ikk4Z60UebFQ466RnS6dcGGIlUn u09HJRYw9vSjQvi3au2mPXSOVA971DHZNwW0bCBXD6wf8u5dOkno7e3eTpifH1W6NF0Q G2Q2TidFH1Giuw8dW/Bz75cccD9YEllWvScdYFdwOXLz3Xnd5JvA4BgPgn3rS1AUwzNx K1fjpgpb1OpsZTmzlS1ZAeaFXnFwNztYK0m5e8Uo7WwPQX47o1DF7GWAyivBSwisf0G7 cP7SUBDhRf+LrgpLJV7+XBiYG73DcciJsH320Lck7REux4bEL4LCyX7gxWErjG+ID0+k 9jzg== 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 m12si23560559ioj.96.2021.09.01.00.42.51; Wed, 01 Sep 2021 00:43:03 -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 S242724AbhIAHmn (ORCPT + 99 others); Wed, 1 Sep 2021 03:42:43 -0400 Received: from mx20.baidu.com ([111.202.115.85]:53376 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242705AbhIAHmm (ORCPT ); Wed, 1 Sep 2021 03:42:42 -0400 Received: from BJHW-Mail-Ex13.internal.baidu.com (unknown [10.127.64.36]) by Forcepoint Email with ESMTPS id 7E42664326BC0EA88C69; Wed, 1 Sep 2021 15:41:44 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex13.internal.baidu.com (10.127.64.36) 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:44 +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:43 +0800 From: Cai Huoqing To: CC: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , , Subject: [PATCH] mtd: rawnand: hisi504: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 15:41:37 +0800 Message-ID: <20210901074138.9133-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-Ex13_2021-09-01 15:41:44:533 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/mtd/nand/raw/hisi504_nand.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/raw/hisi504_nand.c b/drivers/mtd/nand/raw/hisi504_nand.c index 78c4e05434e2..c74f6b2192fc 100644 --- a/drivers/mtd/nand/raw/hisi504_nand.c +++ b/drivers/mtd/nand/raw/hisi504_nand.c @@ -738,7 +738,6 @@ static int hisi_nfc_probe(struct platform_device *pdev) struct hinfc_host *host; struct nand_chip *chip; struct mtd_info *mtd; - struct resource *res; struct device_node *np = dev->of_node; host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL); @@ -754,13 +753,11 @@ static int hisi_nfc_probe(struct platform_device *pdev) if (irq < 0) return -ENXIO; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - host->iobase = devm_ioremap_resource(dev, res); + host->iobase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(host->iobase)) return PTR_ERR(host->iobase); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - host->mmio = devm_ioremap_resource(dev, res); + host->mmio = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(host->mmio)) return PTR_ERR(host->mmio); -- 2.25.1