Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp873694pxb; Wed, 1 Sep 2021 11:49:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKPfaygZkg4F8NOMXNmw3zqJMr20ccA/FgbDRXMDHKz6yYsXjJPrflbrKBQZJX2ZH5CAp9 X-Received: by 2002:a05:6638:d43:: with SMTP id d3mr874245jak.138.1630522166785; Wed, 01 Sep 2021 11:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522166; cv=none; d=google.com; s=arc-20160816; b=oem2OujzUD5y/qSJIVIZqQ5DuUOfS63MPYr1rsrTFXXmSp5rY2rgLdqe64HBYhXwyP hDEMuLP3JSMAMTt+LeVN6cOO4fJxY0YuWIeBMon7PA8eXvytbGdw1buiMU64V0ms5aaF vkWB8ZuWIKslam/HHP+E1ec8z+tou7Zonfnt4rHynrO9yikcxuoULlBwwpthyMXIVVHJ 4m81jt1HmOgC2z3fDgs1iccFfVPEK/4pi+CiyCt0w7mYh5Jp7DxURw6H6eJNP4OOcBta 16JX/y3aIuldsmUpegVwN5J8hAd0LST+W8ni1RBZ8V11YSNFFItBFJmj4ATY4dYBhWkB Zbow== 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=SwoTkhhZV4A2YL6P0UANpS074/bRJxhUslDsCBFqVHg=; b=fdY1247PpSLcN5PELEFoJ9pTJm5ozNVSurcaXwlilmdI/Js4CZpfriY5rrC7AONDGg eRk6tTMQXbinlF2/iU2MIiWrcVga/nsljosZJlxu5EiWoi7xFpPBSF2TliGzSS0o8xtu /0PzCd4BAnvypY97dY/kkGgAsLloMoiGTcAEwwRZbuB11PjM8JLZqUfKZrTt8v0DOtXW YpxhS5Lot3Xp+qs9CvtlzpQaBit/0/wFczE5QLl4+cIIuzSfm1F68CyOW5ez5mb5Fsid 4CRXII/k87Cn1jnddr7mBBKbo332Nfv0FGtC8IiVaw4xxJozdPKMl5q67NcbIv1pfPZy pfFA== 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 s8si428083ilv.57.2021.09.01.11.49.15; Wed, 01 Sep 2021 11:49:26 -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 S242782AbhIAHnH (ORCPT + 99 others); Wed, 1 Sep 2021 03:43:07 -0400 Received: from mx20.baidu.com ([111.202.115.85]:53818 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242755AbhIAHnE (ORCPT ); Wed, 1 Sep 2021 03:43:04 -0400 Received: from BC-Mail-Ex15.internal.baidu.com (unknown [172.31.51.55]) by Forcepoint Email with ESMTPS id C1C3AB27D4FFF1ED20E8; Wed, 1 Sep 2021 15:42:06 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex15.internal.baidu.com (172.31.51.55) 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:06 +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:06 +0800 From: Cai Huoqing To: CC: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , , Subject: [PATCH] mtd: rawnand: omap_elm: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 1 Sep 2021 15:41:59 +0800 Message-ID: <20210901074200.9283-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/omap_elm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c index 2b21ce04b3ec..8bab753211e9 100644 --- a/drivers/mtd/nand/raw/omap_elm.c +++ b/drivers/mtd/nand/raw/omap_elm.c @@ -384,7 +384,7 @@ static irqreturn_t elm_isr(int this_irq, void *dev_id) static int elm_probe(struct platform_device *pdev) { int ret = 0; - struct resource *res, *irq; + struct resource *irq; struct elm_info *info; info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); @@ -399,8 +399,7 @@ static int elm_probe(struct platform_device *pdev) return -ENODEV; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - info->elm_base = devm_ioremap_resource(&pdev->dev, res); + info->elm_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(info->elm_base)) return PTR_ERR(info->elm_base); -- 2.25.1