Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp873661pxb; Wed, 1 Sep 2021 11:49:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpDKun1w3IF1EtTnvzvW32Bi/AL7F1lddIWKJv7WOxlA4NYTngkqS3XhbHm/r5LrDVFzqh X-Received: by 2002:a05:6602:26cb:: with SMTP id g11mr848096ioo.110.1630522164167; Wed, 01 Sep 2021 11:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522164; cv=none; d=google.com; s=arc-20160816; b=aslGrtRgH/FUDJekw+3sCnVzukYvjsxCd83BlzDmh37DSKC9oRXKh9K5aTyM8d2RpU bpgcFh2Izt8UHpgO9FAYNnR4xfViUYkcVUKjd3mmfZMVOq8W/xZ/fhgyiOHWPhd/CwjJ Sa/baeeJ/D2Q0BJ/J9ff70UF0rrg3EI+VE8RRJLWKAZdXfSm73AaxmRQR0IPjj58edMW 1R5mYSW4PF2fySQwkhlavRl4SLRd1WRjxUEEqFDrfM8bktEuRkoZ3Wuib4riFrntYZAY jNGulVET3kjEKaEtsWIrvMAzF+mza3kZ6WMOZAc0SsN5OSJ5LVcsSnEvF3bBKvPdI8F0 sGOQ== 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=/gxeRVCyuFKk18BG6fNpD7X9Cir+hJaZVq78uAGk7XM=; b=oJFDFRHxbJ/hP4VqqJ+i59xWJN4YZyGSVgoDhauULAoAEhD71YTmqGBjX6dVwamOk7 Hix1bOsN/uG3k3TSgdIyGEI6sW1H5t0SWON+v8JT3YOyHYP8Bz5AHjf7V4fR5Wa7SKdH 4sl76HxQpnbgvE3TttGG3//0GJZfhfZW58jYwwl29W70RA+r2nLvjQ7vr2I5OU9ONtuI 0YB7q6Ue+QA9SNUr/3wTZ0PF5K2wEwbP4OOr6HkLwTxZatE23y9aPJVr27JLzuvN96Zm cVVWBYlOwlymHVSFQqdT2YzaDl7eGQ0TUJzU1HtfLHoIIy1DDKBZNfICrMjcL5+IL/gz Z/yg== 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 l18si325699ilc.72.2021.09.01.11.49.12; Wed, 01 Sep 2021 11:49:24 -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 S242719AbhIAHmz (ORCPT + 99 others); Wed, 1 Sep 2021 03:42:55 -0400 Received: from mx21.baidu.com ([220.181.3.85]:53500 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242659AbhIAHmu (ORCPT ); Wed, 1 Sep 2021 03:42:50 -0400 Received: from BJHW-Mail-Ex14.internal.baidu.com (unknown [10.127.64.37]) by Forcepoint Email with ESMTPS id 08A95BE5808309AFAC2E; Wed, 1 Sep 2021 15:41:52 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex14.internal.baidu.com (10.127.64.37) 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:51 +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:51 +0800 From: Cai Huoqing To: CC: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Matthias Brugger , , , , Subject: [PATCH] mtd: rawnand: mtk: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 15:41:44 +0800 Message-ID: <20210901074145.9183-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-Ex14_2021-09-01 15:41:51:936 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/mtk_nand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c index 5c5c92132287..66f04c693c87 100644 --- a/drivers/mtd/nand/raw/mtk_nand.c +++ b/drivers/mtd/nand/raw/mtk_nand.c @@ -1520,7 +1520,6 @@ static int mtk_nfc_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct mtk_nfc *nfc; - struct resource *res; int ret, irq; nfc = devm_kzalloc(dev, sizeof(*nfc), GFP_KERNEL); @@ -1541,8 +1540,7 @@ static int mtk_nfc_probe(struct platform_device *pdev) nfc->caps = of_device_get_match_data(dev); nfc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - nfc->regs = devm_ioremap_resource(dev, res); + nfc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(nfc->regs)) { ret = PTR_ERR(nfc->regs); goto release_ecc; -- 2.25.1