Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp383627pxb; Wed, 1 Sep 2021 00:43:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwncpcFt6ni68pZCPFXc1B8WM0gFemx+jgJUASoFsa1Ku3W6QA7gtPO+QLaBbcmKKlar0cG X-Received: by 2002:a92:cf10:: with SMTP id c16mr24056985ilo.172.1630482226024; Wed, 01 Sep 2021 00:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630482226; cv=none; d=google.com; s=arc-20160816; b=QJ+6IvqI8HMSYzy/RtxLO1vFRHQfVeYPkgmgwth7JbRWVJPHb6SFvoA0xD3fpMtj4h Itbgptf8OpFm90WGbq8yJzrrB1DIcbJqpesIY9UCzhsQt+Ts3BB5U5nVEpz8ULuXY5MQ teMUCUEXHQdbN4/ChZ6zSvAs1QcCUFBK91nGtVefKY0qD2rkPJKkO03yKForhsMoCKBI rnGGfTgeJddL4Zx+ndwNgVeRVzxfcpinDZhkPGchdqA1ek/gYGFO/gOyjhofxY85mJ7Y rYY86GQLuzmMY6evkqDHmrTDBVNhULJUbGnYagDeGOkWpxxqZ9v8YOKH/ucsLTmtlcAe GRMw== 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=xZ2srt47ejToLUpzK0KgqZdHhuOTo2k37umjhkz8xSg=; b=rEOyT9hiG/LeKShXtyCFniG5dwer3Kz+ZIHXoojE8h/bdG1t7D52/yYB5EoeeS3iBH 8q4rK6RFPTg6qh2CwpeV5ZD7lLNw/IZbtS8rkClTnWotWZxbY3vMYnTAL+3JFsP3wt+F o7FFoIgvxQzdHqbP+9gudE2BIMOqdxoPGcEj21O16VaEFn929FO3oO4dkhelO9Vdmt88 I7M5cDvUAh8XTyFrmvrVcPzvzR4N1Z3Xw3+OAU4ccv0PG3is2zneID7fkfvys0vwp/W3 VqzfER2JqoakouVEHsJovAJY/Otyu+PscymPW0xKdoV3vQ4YgOFdSgcYGhiDixKcbOTV 6aGw== 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 132si645426jaf.20.2021.09.01.00.43.34; Wed, 01 Sep 2021 00:43:46 -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 S242801AbhIAHnX (ORCPT + 99 others); Wed, 1 Sep 2021 03:43:23 -0400 Received: from mx21.baidu.com ([220.181.3.85]:54100 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242790AbhIAHnU (ORCPT ); Wed, 1 Sep 2021 03:43:20 -0400 Received: from BC-Mail-HQEx02.internal.baidu.com (unknown [172.31.51.58]) by Forcepoint Email with ESMTPS id 99FE6251F107F6DB2D04; Wed, 1 Sep 2021 15:42:21 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-HQEx02.internal.baidu.com (172.31.51.58) 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:21 +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:21 +0800 From: Cai Huoqing To: CC: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , , Subject: [PATCH] mtd: rawnand: plat_nand: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 15:42:14 +0800 Message-ID: <20210901074215.9383-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/plat_nand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/plat_nand.c b/drivers/mtd/nand/raw/plat_nand.c index 7711e1020c21..c1b2072cb507 100644 --- a/drivers/mtd/nand/raw/plat_nand.c +++ b/drivers/mtd/nand/raw/plat_nand.c @@ -41,7 +41,6 @@ static int plat_nand_probe(struct platform_device *pdev) struct platform_nand_data *pdata = dev_get_platdata(&pdev->dev); struct plat_nand_data *data; struct mtd_info *mtd; - struct resource *res; const char **part_types; int err = 0; @@ -65,8 +64,7 @@ static int plat_nand_probe(struct platform_device *pdev) nand_controller_init(&data->controller); data->chip.controller = &data->controller; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - data->io_base = devm_ioremap_resource(&pdev->dev, res); + data->io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(data->io_base)) return PTR_ERR(data->io_base); -- 2.25.1