Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp995832pxb; Wed, 1 Sep 2021 14:49:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz77oQmIlZX9/aaOfxDUnKdVJYpgfYPVWWWuckgd+bmltTsH2+LNf/kVxGTLAHHdUgXE4Hx X-Received: by 2002:a17:906:b0c8:: with SMTP id bk8mr1757524ejb.412.1630532962017; Wed, 01 Sep 2021 14:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630532962; cv=none; d=google.com; s=arc-20160816; b=gCOYGI1lRuQp7OiKSICWXCL8b35yg98XBMIvj/+buw4yR5xzojNJMWsgh8NX4X19K2 D+VEQ086e7MSeHK4fi6cKU4a4aOooBJrZW6Zb7Hc5PHR3if72GJ8xwyX+xAxDrAdP7km W8N0dL/WUUCszsGNLQAgs/DeLBN5+FG+b9i5KyT7wlUczQ4JHQgW/sULmwxfrtmqiOXq wIMfw26J1H5j4A0hPbihGmBKUXcA4hc+USx0tcceHMDWL9wQqyyf4dm7GPs71WvzaR4n reIjDzJd64oTsRdoHbHv8xqNg8710UFZz7Yck2ttebsI+Wg10+ilJ2Tbu+DB7itF6qp1 jjFg== 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=MkCmKySpewDatzEfQhxXCvxuxeFSYAUkOdjF9+k6I9k=; b=sJ7hIjfkBYE/2+5UJCYQjqXJZvSbCAK9JKHoyQDgFtEvvxtdbbOPqVPYpSfclRLr3F e7Vj1Z0w5b66D7m6M4CRMNzbsm4+62BzWClREC99741/WtTM55oMqrIzw5EZu7ZHXimn E+CtjMolZCUFpCTJg3SjvvIb2KIVqF8lMEaT/h4hktaaKj060idzwCcfp5PZ5RwnBExz 9aUnCyk0RtfM1R2NNZG1EsrZkX02AUmd55XipEmHcu+Fpv8zaZjMZC3irQmlvHOowc2l qBp7N5wvw36JEic4faT3ZQj/JnxfKadlOC1D6lt146eAoZGvQYqvwHMj3x6sYxL/uX2j q+mg== 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 r15si713330edd.248.2021.09.01.14.48.58; Wed, 01 Sep 2021 14:49:22 -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 S242835AbhIAHnn (ORCPT + 99 others); Wed, 1 Sep 2021 03:43:43 -0400 Received: from mx21.baidu.com ([220.181.3.85]:54604 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242744AbhIAHnl (ORCPT ); Wed, 1 Sep 2021 03:43:41 -0400 Received: from BC-Mail-Ex10.internal.baidu.com (unknown [172.31.51.50]) by Forcepoint Email with ESMTPS id E76E1257303A07114FE1; Wed, 1 Sep 2021 15:42:43 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex10.internal.baidu.com (172.31.51.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 1 Sep 2021 15:42:43 +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:42:43 +0800 From: Cai Huoqing To: CC: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , , Subject: [PATCH] mtd: rawnand: txx9ndfm: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 15:42:37 +0800 Message-ID: <20210901074237.9533-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) 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/txx9ndfmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/txx9ndfmc.c b/drivers/mtd/nand/raw/txx9ndfmc.c index b8894ac27073..b42d61b30c0b 100644 --- a/drivers/mtd/nand/raw/txx9ndfmc.c +++ b/drivers/mtd/nand/raw/txx9ndfmc.c @@ -284,13 +284,11 @@ static int __init txx9ndfmc_probe(struct platform_device *dev) int i; struct txx9ndfmc_drvdata *drvdata; unsigned long gbusclk = plat->gbus_clock; - struct resource *res; drvdata = devm_kzalloc(&dev->dev, sizeof(*drvdata), GFP_KERNEL); if (!drvdata) return -ENOMEM; - res = platform_get_resource(dev, IORESOURCE_MEM, 0); - drvdata->base = devm_ioremap_resource(&dev->dev, res); + drvdata->base = devm_platform_ioremap_resource(dev, 0); if (IS_ERR(drvdata->base)) return PTR_ERR(drvdata->base); -- 2.25.1