Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp873881pxb; Wed, 1 Sep 2021 11:49:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGZyhw2RnnRF1kxPmCLyvVtS0HhVHq44qVu8hCZSySxucOm0XLl2oQVA1x0/RG6D4JOLzY X-Received: by 2002:a5e:8a4a:: with SMTP id o10mr835423iom.11.1630522183844; Wed, 01 Sep 2021 11:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522183; cv=none; d=google.com; s=arc-20160816; b=tlVv4voRBXsAqzLYF9ErilH+/Lu6XDMB/7toivjwKlv3Qzy+vVoXM7Ke/L0pXwFlKJ wgGGI23mIDIs5yhRwYBusBruUgBos9nG1ibMrFxHmjUv8OgMjPtUp1Zb9RKstMlpbQkR RP9r1+RjQj1onx23t10p5apWtobJEMRmn2g7pO6Zgm6Qdzx4KJd9yqkbQuQw4mh8iEXp MCMIiPNUw1fTMlz6Ik83E5Pef+144HLrxvkFhIrGDQdv+htng0XRhw42MfKeUyEYMhIg d2ncCaiU2Kuv+pre/jSZ+YUAyERVEnW/Yr1QMZiDJk0C+p9CmPGMuA4eQcfuwnr+wwvA gxdw== 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=hREO3RB5ZOPW0vBVADjLdu4rxnFpze3bRgXmeBE8gDY=; b=xqvhKNM9fahwAcM5KxhI0NBhU4DWgva1mCSYEzp1Ser/w9oew43BHvTDKyiVdK6CI2 V3mTmmIRPiFsPkAb+/hjbYCPUd0ty85lHgAxj3terOegystpc3zwJaonUJN7q7g10wjk li1fUYmEqdDjRIz8nIXY5K3p8F3sMuI7HCyS7mZ3csTezO6OHyf8YLE02C5fLvqIddH6 CG7raFrq1RN5h1VYCqCp8C/LoPEaCuRiq8/iuh6jcWYKv3ay9KxkXIhKW/gYAbJpIsDH 8srLS7jDd02X+2QUMUKasyx3D6lL95beX6E0qgY4HBTz1WY4+Wo0mXC6LCeREXwNvTKo yC8w== 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 f10si319554ile.158.2021.09.01.11.49.32; Wed, 01 Sep 2021 11:49:43 -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 S242813AbhIAHnw (ORCPT + 99 others); Wed, 1 Sep 2021 03:43:52 -0400 Received: from mx21.baidu.com ([220.181.3.85]:54714 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242811AbhIAHnt (ORCPT ); Wed, 1 Sep 2021 03:43:49 -0400 Received: from BC-Mail-Ex14.internal.baidu.com (unknown [172.31.51.54]) by Forcepoint Email with ESMTPS id 528B49B64DE2D306FCD6; Wed, 1 Sep 2021 15:42:51 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex14.internal.baidu.com (172.31.51.54) 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: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:42:50 +0800 From: Cai Huoqing To: CC: Stefan Agner , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , , Subject: [PATCH] mtd: rawnand: vf610: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 15:42:44 +0800 Message-ID: <20210901074245.9583-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/vf610_nfc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c index 40d70f991d89..a2b89b75073f 100644 --- a/drivers/mtd/nand/raw/vf610_nfc.c +++ b/drivers/mtd/nand/raw/vf610_nfc.c @@ -807,7 +807,6 @@ static const struct nand_controller_ops vf610_nfc_controller_ops = { static int vf610_nfc_probe(struct platform_device *pdev) { struct vf610_nfc *nfc; - struct resource *res; struct mtd_info *mtd; struct nand_chip *chip; struct device_node *child; @@ -831,8 +830,7 @@ static int vf610_nfc_probe(struct platform_device *pdev) if (irq <= 0) return -EINVAL; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - nfc->regs = devm_ioremap_resource(nfc->dev, res); + nfc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(nfc->regs)) return PTR_ERR(nfc->regs); -- 2.25.1