Message ID | 20230713104422.29222-1-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1751125vqm; Thu, 13 Jul 2023 04:22:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlE6SKBLvbQcOBDWPVpgUencK4ipVuHUwv0EAW0O3GjSj0IjJ82M/Jd+2Gbs/yruzs4iAlSF X-Received: by 2002:aa7:c64c:0:b0:51e:57ba:cb8e with SMTP id z12-20020aa7c64c000000b0051e57bacb8emr1569279edr.5.1689247340776; Thu, 13 Jul 2023 04:22:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689247340; cv=pass; d=google.com; s=arc-20160816; b=PXMbUSNA7QtMxk1BpyeBWlOTNVJzpEsi2rjocpytg5eN2KBOXkJAWmIeh6KWwcut71 9ry4spZG9Ee0oNvIGliT6HfvahhELTO9uYCKaBCbOLP8IN4WaAgVzwKFOmVGN3ldnEmG BbGwcveKFnUoAroI4d7vJeyAyJaS3jC9xOLkDqtWFpbJD7ZyIwqbTf+a/T/ntJ2VyNQg dkYHvgzZ5BXi+0MTyaPEZAbBSpnNB0MdNXVCMv6VmukbfVQ2mps1F1Ta/nF3py7vDUjn HX0by49Wr3gwwbuQRrmHC4GtaDaPSIEJRM10xrfTiUPjxUpO4liMR++h5CxmfRCd8RyB WOsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=HHhZRiqTtjNAX4MrJq+vd7EUW34Wu8UDCOUjNq/dTe0=; fh=0quFVFTe7bbEy8lJ1kO9geRIhGu0y/ObVx9fgmtMhsI=; b=BrY6B38lOUhpo4cD0DyGUc1A095UeHBh+3OpZVHHJlIUmFrhgGKAxDDwAtdehv6LmX /FZInobu/ff/ccMQMYWjh0nxxnldqOpn/uYcmZNNYylaOXZKby/Zh7YMDS7dmoyu8+LG LVeP/6oxGvySEhR4QO32Q/IZS+81CKiEAQkH9VOg7o4Bw8WhTu6TEqfrYXtQLdjAk+b2 6zBPMyVgR3r7pYt1BpvcRIHvpOT3ee8ZZXsx6ysBKIMvvc2bsLhi1m7kZQ3y2sEfhZG6 ACkh+Uqf2vqqhSY2mhAGiu/4mma5Yqpx/A+eRKc3Gqpc43xslagPJicNm50zYtjUQO1+ 5XiQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qLQo8Ns+; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n14-20020aa7c44e000000b0051e052dbb30si6493767edr.608.2023.07.13.04.21.57; Thu, 13 Jul 2023 04:22:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qLQo8Ns+; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234057AbjGMKpe (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Thu, 13 Jul 2023 06:45:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232877AbjGMKp3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 06:45:29 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2110.outbound.protection.outlook.com [40.107.255.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AA1A1FC0 for <linux-kernel@vger.kernel.org>; Thu, 13 Jul 2023 03:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i/PI/hWGMll0+eBFTM8YViJVYG3pI/3JzjsZu2GgM7qWnaVgJFAUU7i2iZ4LHFNykGLGTvsUFMc/LhFPWNggf05+oK/VXu5Q/9KLMNiDKsUC02MeWS07pxP4eKGPyDZnPL6A98piKQ2g+j45KmjovTQ47vp/xpTTyYFtwv8oG3ZdtCnbMC+5JMk23MwopzAXX1sfnyqS9jBdb36eS18iZEvBIuqYs51s58MhC9m1iiVIbMVzIWSX9neyY/8Wn4E38+1Di81mdPuifIN/20FPgBbC+cx+xG+XXjtYaY80UKf/8KFvScLZvvk2XDFKNIUFKwFX366uR/qYcO7vNwzhrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HHhZRiqTtjNAX4MrJq+vd7EUW34Wu8UDCOUjNq/dTe0=; b=gCoZmE3ohxoMwDfNV8ijnLpnbNfwXsWagjChQJBREt3zOxx52+V3BLbWY634cNSb6llJsroOhV9QpvKgLHOb/T+Exu/ob/lEUAywUuFGWPNZAe3xxecjahBEdPl/p6BfcKIX8TXfAhZmeNNLLZptvn/lR+ci8NfhMHceXKoJFVsSKsfbcqjV4WdoDiSg9d2rUs+Bc5xGjv+fExgzApS7p/nbqt1ppNlfopYROXHmrEjZOo2rrC/fz9xluO99XAqKerYA6cAagXH80ZYAIypLHMtsHhnE/nssifBNmJwkaOutiKtKmNAWNHp6OkCQ0L367b4Df0gCVl+Qaa5RV8+Qkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HHhZRiqTtjNAX4MrJq+vd7EUW34Wu8UDCOUjNq/dTe0=; b=qLQo8Ns+pc/bIUJeWDV1to/u5Gfrk7h4iXmBCImdZa/ITq3RNlH4P8Hx/M24gtBacvQ4icW+aE78I4mg3HzlMBPNDotBC3P62//RxalCivRDcZv2gx4xLYZ4KMMeIhnr6kuWieHGEb3Q+byRntPYrr+ib92IugOt2zHFaKbtGodfnpFNBoIcjigk+UmZ64ipAEpAAeYVjn8ylLmOp7VMyWr5QRB+9XRfGNRDQ1qGix48N4hcl5zVWOP1BJVNwpfdP6oyNOgB33XqauurBmWb+Hzo5zUoJ7t2vUMSsRVCdkSuHsLQyf7v7UQcCG1LoGu3esqi/A8+RWqzCiUF8YBFfg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SI2PR06MB4123.apcprd06.prod.outlook.com (2603:1096:4:ea::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 10:45:21 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 10:45:21 +0000 From: Yangtao Li <frank.li@vivo.com> To: Kyungmin Park <kyungmin.park@samsung.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com> Cc: Yangtao Li <frank.li@vivo.com>, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] mtd: nand: omap: Use devm_platform_get_and_ioremap_resource() Date: Thu, 13 Jul 2023 18:44:22 +0800 Message-Id: <20230713104422.29222-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0171.apcprd01.prod.exchangelabs.com (2603:1096:4:28::27) To TY0PR06MB5282.apcprd06.prod.outlook.com (2603:1096:400:207::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4123:EE_ X-MS-Office365-Filtering-Correlation-Id: bc13d717-4e90-4b61-170b-08db838e40d7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zJXkEAYdVJ5E4mA18PdrY4Ef7CUXRlAJZ2gsD8PLIleveacReHuSHTr19Xpm4iPnBcOonYg0GzJO+KtrPDAAkVF3VPMv6ewT4mNk8fpQKuvKP2ZZE0F88xsWr+c8jVrA9ZuC4+pMlbr9m0gdGPuOHxGL8nTLruNYzV1+Q3y5FApbxLA7U1dPzOXCHULZrvmjme+F0PX+Ltel6jE0/tgi9D8r6dyoyOEgP3zNcguGbIjWMBzaPbqd7q1aatbxwfJ9v572/FA6YNRAgnhNu70FTGCLIRb30Cb4Q4UmC2aIpCYBqRJKeGcg6k0oldkCb6wG6UHLRBXaTkxMlWpFEM9760UzHOSHK9XHUL+sfBH7iE4laGt14Ghbuw1qz18LJkA1BpbUORf4bbjy6xVBJ9lNeD1F5AfZFHM7kvarX4jmc4vt2Q9GUdm/PfIhTfh+5bBzDmobK/EhkpyAV0qAof06SZY0gUht1q0+MoYRk9Wbf2y4RO87VBOXO457ZtjbHr0K+qJHc6KOARaC63ue4xn5nJUxFXsnjXNOKHZWHXQc498aGJCZVA7+WWkf/gwrworDUYiqOTMqgq/D7T9+rMvwrle1jf78Lu6ZonUwcasHIW+l6wLJJUZ1MBoXQZ9GYbhF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(110136005)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KUtGq5YpTXXOx41eweplUYZ94/jLz7mAAPxMepPO8+iOT139uztibfB10vhwxcURqNMPAw/Zco9pOAxVB8v4dd/xBl1TRGC/9CeVChNeZE8dsSfHcF3/ReGnIs97IIJ/YNe/pVO1+nqJpfFzloEheb3iJ47RvJmTK+sDufO2cEIPgF8NncAOZU94W+XYnaFybFW/m9VRg3JJgLt2YIaNlAUwQRrSsEmmS8E3KQpExTKkoDqCIuWvdM03at1TvJFQ+dyJoatsYLHMp1VYkUFAuOIRKWHjFy7d9gXlUW8RLz2kyr2HIoL/mZzOhRiuNWcLo1wk7nMFvXywYBRza24Q7FrHPDIkc8ZktmK3zVZayEkaBeq3Pwdsc61D7LOdBFMAuuM2h8k96V5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HOD6q7EzZl+aDNer6RF9PUzU72olty7VoL39vObZHT55tAHgAQ1oFy5mtA49yOeaOpgL/HAG66lIfWwFai8jTUZpwiQ7SGKpzknqwINYboMEZFZOxlk3yIA4IpTjcBxcqj X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc13d717-4e90-4b61-170b-08db838e40d7 X-MS-Exchange-CrossTenant-AuthSource: TY0PR06MB5282.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 10:45:20.9383 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7KYnnPKz7GzU3JKwfPhA0bqtvPQlWVXnqdckxFRWfVVEYKcper2A9GDbf04xlQaKm4xXY3u/uEMUnhDgr+pleg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4123 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771304219713684533 X-GMAIL-MSGID: 1771304219713684533 |
Series |
[v2] mtd: nand: omap: Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
李扬韬
July 13, 2023, 10:44 a.m. UTC
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
v2:
-Move devm_platform_get_and_ioremap_resource back
drivers/mtd/nand/onenand/onenand_omap2.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
Comments
On Thu, 2023-07-13 at 10:44:22 UTC, Yangtao Li wrote: > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_get_and_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Yangtao Li <frank.li@vivo.com> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel
diff --git a/drivers/mtd/nand/onenand/onenand_omap2.c b/drivers/mtd/nand/onenand/onenand_omap2.c index ff7af98604df..904df2d1538e 100644 --- a/drivers/mtd/nand/onenand/onenand_omap2.c +++ b/drivers/mtd/nand/onenand/onenand_omap2.c @@ -467,12 +467,6 @@ static int omap2_onenand_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "error getting memory resource\n"); - return -EINVAL; - } - r = of_property_read_u32(np, "reg", &val); if (r) { dev_err(dev, "reg not found in DT\n"); @@ -486,11 +480,11 @@ static int omap2_onenand_probe(struct platform_device *pdev) init_completion(&c->irq_done); init_completion(&c->dma_done); c->gpmc_cs = val; - c->phys_base = res->start; - c->onenand.base = devm_ioremap_resource(dev, res); + c->onenand.base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(c->onenand.base)) return PTR_ERR(c->onenand.base); + c->phys_base = res->start; c->int_gpiod = devm_gpiod_get_optional(dev, "int", GPIOD_IN); if (IS_ERR(c->int_gpiod)) {