Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp383834pxb; Wed, 1 Sep 2021 00:44:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd1Igx1BYojGJoez8Y6r0HQH5HKJH2+oVyI10YYvY5OeO/upEGydGEdoJVkwkuO6JwCeoZ X-Received: by 2002:a05:6638:150c:: with SMTP id b12mr862199jat.110.1630482248720; Wed, 01 Sep 2021 00:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630482248; cv=none; d=google.com; s=arc-20160816; b=Lt9++Vd8TUGOLTj2yirEAvGEJNFKgx6zgMBW0/37KF1A3N3Zq4fTJC6/tttgnOn17I CV5O6eHrh7fP/BRrRiMLKqvKYKwz63fU0MkcSUytPwUtDtZgJ4x9Z2/FikMh5I5M+kL6 kZ6O9Yj6a+/jbVFD+eNlthpAytIZBlIf/uC8tqKNAd3Uvf4wwLvyGDcd+WnGI/Nr2UYW iMN2ZAR+/DDEASJznzJSQ2qQZxhcWGFo/kedqCXCwp2SbdXxjHc6fKOhjH/FzYajKI1y SqFzcKtm5birM8LsiMUQoei0IeJ/pHyWuu7Q5h9fK2+zeS4TC8+iJa03NTtb90kEUELa xCWQ== 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=Q0TnoDZ8mPsMBazlKmfHe/l/q+b3AwMz10JEnGHEfNU=; b=np6VrBp402/ECVD9kwl0z+vr9VqCM2zY3yIkw4lMIjuKjXzulIX99wQFTgPMSP6kBV SkLXs0uOjFtngNZ2/xyYkFwIvLJss8RZM4oqPjtm9cGumyq2Nc7Hv8BXJRanjBjaCHdU jYLuCQFjRqyq1hnLUvd/YJXIpHod20LXdcky5We+gxS0Ryfl3TghK3Ybo6yNz4qkkwuc RRndEdfS1Bt2z4nacukyVzzxmJ8MVJTVFtIByCAt67myHNp1ejR2vy0ZG37KYucfp2EH GNyJ0vjO5vDek0DK/IA8gdv9xU3eVMzXdIQrKqYsl9je1hwJlhSjfGxfPSj/UAb+zMdX LqHw== 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 n45si19295952jac.76.2021.09.01.00.43.56; Wed, 01 Sep 2021 00:44:08 -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 S242790AbhIAHnh (ORCPT + 99 others); Wed, 1 Sep 2021 03:43:37 -0400 Received: from mx20.baidu.com ([111.202.115.85]:54460 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242744AbhIAHne (ORCPT ); Wed, 1 Sep 2021 03:43:34 -0400 Received: from Bc-Mail-Ex13.internal.baidu.com (unknown [172.31.51.53]) by Forcepoint Email with ESMTPS id 8DBE4C9B6D2969D78273; Wed, 1 Sep 2021 15:42:36 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by Bc-Mail-Ex13.internal.baidu.com (172.31.51.53) 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: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:42:35 +0800 From: Cai Huoqing To: CC: Stefan Agner , Lucas Stach , "Miquel Raynal" , Richard Weinberger , Vignesh Raghavendra , Thierry Reding , Jonathan Hunter , , , Subject: [PATCH] mtd: rawnand: tegra: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 15:42:29 +0800 Message-ID: <20210901074230.9483-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/tegra_nand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c index fbf67722a049..32431bbe69b8 100644 --- a/drivers/mtd/nand/raw/tegra_nand.c +++ b/drivers/mtd/nand/raw/tegra_nand.c @@ -1144,7 +1144,6 @@ static int tegra_nand_probe(struct platform_device *pdev) { struct reset_control *rst; struct tegra_nand_controller *ctrl; - struct resource *res; int err = 0; ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL); @@ -1155,8 +1154,7 @@ static int tegra_nand_probe(struct platform_device *pdev) nand_controller_init(&ctrl->controller); ctrl->controller.ops = &tegra_nand_controller_ops; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctrl->regs = devm_ioremap_resource(&pdev->dev, res); + ctrl->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ctrl->regs)) return PTR_ERR(ctrl->regs); -- 2.25.1