Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp995822pxb; Wed, 1 Sep 2021 14:49:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwdG3x0zhan+oSY1L/UIR/MHslJhDFQUYo45UJfkKgVmE6CUXS5AXL6jggX2vHv1+wHjsq X-Received: by 2002:a17:907:92c:: with SMTP id au12mr1733600ejc.523.1630532961105; Wed, 01 Sep 2021 14:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630532961; cv=none; d=google.com; s=arc-20160816; b=ohsP6pc2O9/y3Xc8/foGQxYe/vun4UEXp1dwMqcqZcQQY5NOFBtcmMGWkMPXmscxgg DW2fQwvew8+xGl5FXw2xX4w9472KSZal2UD4okFf+Tw1MgA+e0yhJlZrzgf4/ct3eGi8 CcqhmOKFNk/X0HMlO0HRUfTy0be3IwaYoQf+WR2XE8YWS5CEAFze+FkU9TXwgwrjcD5L hcDyVgooHJiJvffMWCnJl2zHutnwAWI8rRoQ+gOST9aCkeeUHCBkH/J3zDHCLlPfVr7c X6pKTKnuUhg4dnvOZ+k+x2OmBtbR398l/K87hk1otgKmiuHkbyygNeA4VLblQFMOM9XC S3Bg== 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=PiuTo8KFPJbl1WgS13+DDaBwTOvEO4ln4ukEqLAdbwk=; b=O5jhIwI5GUTXN+2VR0rkv4LCScvoyfHySnFm9UBp+qv9AOL2CnsAaadvILZOdwu9kV zqtHomGTDAD6U3wKvuEsa0uVcY5N+8t6ONpq6LsCbHp7HmHjMTbT0xBQyE69A5SdZtrG O0101wlGIVq6MOW88QO9UCyhVr9FP6Z4yovMGPEPC6EmetFfHEVISXVQZ8vmR0NLxn9S x2sD+VtL/75iHpIr6pV9ZUgctmifBg/iTmfwPMuTtI3fBTeazUGwbmUEnvUmEHmdty7u 7svnWMlEOe4ji67S6w0aKRoLwfkhnHxe3vzhTesmhDQOWrn32ksQbsfVH87Zec1mcBj5 oKaQ== 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 qa36si814013ejc.337.2021.09.01.14.48.57; Wed, 01 Sep 2021 14:49:21 -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 S242750AbhIAHnd (ORCPT + 99 others); Wed, 1 Sep 2021 03:43:33 -0400 Received: from mx21.baidu.com ([220.181.3.85]:54330 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242794AbhIAHn2 (ORCPT ); Wed, 1 Sep 2021 03:43:28 -0400 Received: from BC-Mail-HQEX01.internal.baidu.com (unknown [172.31.51.57]) by Forcepoint Email with ESMTPS id 0E86B127D52D4CDB4906; Wed, 1 Sep 2021 15:42:29 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-HQEX01.internal.baidu.com (172.31.51.57) 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:28 +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:28 +0800 From: Cai Huoqing To: CC: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Maxime Coquelin , Alexandre Torgue , , , , Subject: [PATCH] mtd: rawnand: stm32_fmc2: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 15:42:22 +0800 Message-ID: <20210901074222.9433-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/stm32_fmc2_nand.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c index 1c277fbb91f2..97b4e02e43e4 100644 --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c @@ -1899,15 +1899,11 @@ static int stm32_fmc2_nfc_probe(struct platform_device *pdev) nfc->data_phys_addr[chip_cs] = res->start; - res = platform_get_resource(pdev, IORESOURCE_MEM, - mem_region + 1); - nfc->cmd_base[chip_cs] = devm_ioremap_resource(dev, res); + nfc->cmd_base[chip_cs] = devm_platform_ioremap_resource(pdev, mem_region + 1); if (IS_ERR(nfc->cmd_base[chip_cs])) return PTR_ERR(nfc->cmd_base[chip_cs]); - res = platform_get_resource(pdev, IORESOURCE_MEM, - mem_region + 2); - nfc->addr_base[chip_cs] = devm_ioremap_resource(dev, res); + nfc->addr_base[chip_cs] = devm_platform_ioremap_resource(pdev, mem_region + 2); if (IS_ERR(nfc->addr_base[chip_cs])) return PTR_ERR(nfc->addr_base[chip_cs]); } -- 2.25.1