Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp873306pxb; Wed, 1 Sep 2021 11:48:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPCvFL8CGZAIxYqoE1LF0p47myITebl5Rzc1dBka8lX+stWVkP52iKmQ6rsht9WsdwOcrt X-Received: by 2002:a92:c68a:: with SMTP id o10mr642084ilg.163.1630522132190; Wed, 01 Sep 2021 11:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522132; cv=none; d=google.com; s=arc-20160816; b=v6aNexlctYq2yRQZXzzE7xCKs5ETyoeFlDIyNxb6ipnzfFZRUWRG285Ttp5cWIGn24 WCGVkrD/wAGkgk2md4AykxELN1topwQ6mMFDY1t9C54gaUfzSRRS2umAwLE94Rdui0Ju oI5Vo8FRGqpQ75SVY6REMLavzdWUl4MHQe85E+/HkkrfMf8pivJehaMKRvVu2fVrg8xD f+MKxbb0UjVVkU9G8i+bgVfQwnrRqFOKkb6DRd9llnjCwKdTL+GYdpO2tKR2ehCVUsAE b7QDWk6zgI6EEDWyRkDKf7C81tLvJDMyifVlvmjSYZnAGotFFGyWvPXBG3o0IkE/q04D N1mw== 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=v3m4uNMrR5U/FByH61Ihg7jIin1/3TyE5Zge6JDZwjQ=; b=dO5kT/fatr8SWsiu/wZTsm0qWA0kQJXej/ZRa22o5frwxdcsOxNxIiZI4dRsBpkvsa FYWwIpYzs1hoSH/4bpp2htCi+4uIdx4C1AzJweBOEj9twdGXlYPckJekZqsi+VYA5tkZ Ud99Zq0BoYUKIJSFAGTvuxpe+CJMZbm/iyVC1bZoi7GkZOJT3XgVcCSWWpmZbrcJ29VG a0vcpXFkwyNWKByOVUxT3nRTZiEyjhuIgO8n/nyQevAG4E4z7WPGTw4W6g3DFJZTxIeE KPMVgH+AAa0Y7C52bBloQMZhEvmynsRC0QAaV2tgWZJWugDIULFUmsMzc3gm2tWw9B2+ whew== 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 d7si379198ilg.5.2021.09.01.11.48.40; Wed, 01 Sep 2021 11:48:52 -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 S242700AbhIAHmV (ORCPT + 99 others); Wed, 1 Sep 2021 03:42:21 -0400 Received: from mx21.baidu.com ([220.181.3.85]:52980 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242699AbhIAHmU (ORCPT ); Wed, 1 Sep 2021 03:42:20 -0400 Received: from BJHW-Mail-Ex01.internal.baidu.com (unknown [10.127.64.11]) by Forcepoint Email with ESMTPS id 5E6A51F37D74CA70F191; Wed, 1 Sep 2021 15:41:22 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex01.internal.baidu.com (10.127.64.11) 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:22 +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:21 +0800 From: Cai Huoqing To: CC: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , , Subject: [PATCH] mtd: rawnand: denali: Make use of the helper function devm_platform_ioremap_resource_byname() Date: Wed, 1 Sep 2021 15:41:15 +0800 Message-ID: <20210901074116.8983-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_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/mtd/nand/raw/denali_dt.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index f08740ae282b..8513bb9fcfcc 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -113,7 +113,6 @@ static int denali_dt_chip_init(struct denali_controller *denali, static int denali_dt_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct denali_dt *dt; const struct denali_dt_data *data; struct denali_controller *denali; @@ -139,13 +138,11 @@ static int denali_dt_probe(struct platform_device *pdev) if (denali->irq < 0) return denali->irq; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "denali_reg"); - denali->reg = devm_ioremap_resource(dev, res); + denali->reg = devm_platform_ioremap_resource_byname(pdev, "denali_reg"); if (IS_ERR(denali->reg)) return PTR_ERR(denali->reg); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_data"); - denali->host = devm_ioremap_resource(dev, res); + denali->host = devm_platform_ioremap_resource_byname(pdev, "nand_data"); if (IS_ERR(denali->host)) return PTR_ERR(denali->host); -- 2.25.1