Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp383606pxb; Wed, 1 Sep 2021 00:43:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLd/r2u/91WZdjDfPI6s4F1KwquuwZw4qQnehXhdRm3QGKrBu0Y7+2sd/a02Qe+H6FZSxH X-Received: by 2002:a02:cf06:: with SMTP id q6mr6761484jar.89.1630482224236; Wed, 01 Sep 2021 00:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630482224; cv=none; d=google.com; s=arc-20160816; b=U0vSapGoluYTLOxtqVkqfLFWrXi4vs4fBRVT5QONi1dyF3mVHLiNagpUp6Z4m2B+oK nocOKEGlXT4kRvCR9KYlJ6P9pLZ0M5adbnEvYSzUcGu66UaxSxatMAKkr/q52c6/tzW7 gVk8/UksUHq6p7TDkbQSHSmonURIvWGjwsb8nTWpKgFVBP04EhH8++cW5KQ5VvE5woXw GavrO+xpEF0uRniCOqiNNuRCgCJPmMwFc8QQ8iMf7bBmdshC/SpVwlJ7EUJIwgI0SZ6P W0N+cYiUIrc0+6tzjMY0FXn87Q6PH6QibCKw4MbNn9AYP3XGkQ0GqiZG8KVX8aU6Hq/Y Zaqw== 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=39rK2GdqR4xd8/as2D4rmzI938gy9WMn7vG7927Gf8Y=; b=OP3yLuu/4/rDPpvrqpuWVEU2nnkTbZlrWcUiUG7scBbingo1gBjAoMuAnZGeCsKTBg 46Z1DlcjM2ecXNj5Gv76XNVCMgjSNyLHNyiTsnYljAHHc4J012gxdWJlnsTHJgC5zgji Hz7ykrzHMc7qQLxb3BSXimdSUo8FjtLZkS2RVTJGC14ZVbVw/8xyIkZI+rQ1zMOgroFO p28Q7kzSbu8VBJs2J8gE2dsjIqQ2+H76U43vzQj6hb+KB/LaFaxaWFuGnfBkfaxz4nme j/mjdP2qquOJtGnsOmGS/i8z+yKvoyBUxr/+AkUR5TOUCRL+VDaD2/axHPmHV09xJgPD qQ2A== 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 a10si15917784jaa.15.2021.09.01.00.43.32; Wed, 01 Sep 2021 00:43:44 -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 S242751AbhIAHnN (ORCPT + 99 others); Wed, 1 Sep 2021 03:43:13 -0400 Received: from mx20.baidu.com ([111.202.115.85]:53968 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242735AbhIAHnM (ORCPT ); Wed, 1 Sep 2021 03:43:12 -0400 Received: from BC-Mail-Ex16.internal.baidu.com (unknown [172.31.51.56]) by Forcepoint Email with ESMTPS id 558523D231C6C8259D5C; Wed, 1 Sep 2021 15:42:14 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex16.internal.baidu.com (172.31.51.56) 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:14 +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:13 +0800 From: Cai Huoqing To: CC: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Neil Armstrong , , , , Subject: [PATCH] mtd: rawnand: oxnas: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 15:42:07 +0800 Message-ID: <20210901074207.9333-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/oxnas_nand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/oxnas_nand.c b/drivers/mtd/nand/raw/oxnas_nand.c index f44947043e5a..cd112d45e0b5 100644 --- a/drivers/mtd/nand/raw/oxnas_nand.c +++ b/drivers/mtd/nand/raw/oxnas_nand.c @@ -79,7 +79,6 @@ static int oxnas_nand_probe(struct platform_device *pdev) struct oxnas_nand_ctrl *oxnas; struct nand_chip *chip; struct mtd_info *mtd; - struct resource *res; int count = 0; int err = 0; int i; @@ -92,8 +91,7 @@ static int oxnas_nand_probe(struct platform_device *pdev) nand_controller_init(&oxnas->base); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - oxnas->io_base = devm_ioremap_resource(&pdev->dev, res); + oxnas->io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(oxnas->io_base)) return PTR_ERR(oxnas->io_base); -- 2.25.1