[11/18] mtd: nand: samsung: Convert to devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource()
Message ID | 20230707040622.78174-11-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3017880vqx; Thu, 6 Jul 2023 21:40:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGAC1s5Am1NjJYt+vC2kCPINlSH4JsnKEV4IbOcJKoKzR4txNNRZcnJOtbE1bjsHZvsITXg X-Received: by 2002:a05:6358:e495:b0:12b:ed77:8b66 with SMTP id by21-20020a056358e49500b0012bed778b66mr4051899rwb.7.1688704804132; Thu, 06 Jul 2023 21:40:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704804; cv=pass; d=google.com; s=arc-20160816; b=kuD8mN0hFm+RTRYX9F+zlZNEw0gKun6i/1A7TF82ztvKYm+hT7obFWWzsrJHP3VZkc WkPETbWQZQEqIcR5VSYfpzFYfot+OC/mOHDc3v49a7+19ihoCYxPnZ+4RCSANryqn5f/ Jjxu+UsPLIHhrGJoVHF/4bpjpOBhCZ/sqguCkJGMlRLhblF11400fEPE1IgE0iId17g9 5Ie3hw2p/9tMvrgNESVlOunnb2/mANrycE45A4kt3UHZRfuYwQyAAvYMKAVOpl5ei2D5 wwZ0mX6bwlbLU/ojCGynsZlC9phCso5EUpV0jSKildw+pN4SlFZbSQLZ1yTnCTvFwrap N64A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W0+iI7AY1yI8a+yrMcuBIJJ035tveqmejoJEjMArvlw=; fh=0quFVFTe7bbEy8lJ1kO9geRIhGu0y/ObVx9fgmtMhsI=; b=mfe3RPLUXJRH6SzqZNNc1f3xnK4yljtQVvtbuRpu8zYNbkkv4Prgblu5C3W+Slwzf5 lW8GNMDfdTAsskE77Hx9uSbPoIS5d/j1aTuDL+O7AezEJLNx+Wp7YYheqUn81UJqxJnA fNaJcIsS65h+HQ5ekMC5wmx+822jPJ1/4wxTwKpB6aNkXpwBD10+uk6atO7SAtmY6W3B QStKNLMIuLkFEmo2tQaSmABdeqQZJWR1TAtZvkgpGoSjIkJ3IxpZ+Z4aJBP9iu884Jwi LfRXF/1Mf8SDOiGzBZwjnX+5oyP8kGfq26r9K8zuKfte04UiI5em+WfU4YobTjPoOlW5 JddQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qGRN3jkB; 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 r20-20020a6560d4000000b0054201a3f08dsi2896876pgv.592.2023.07.06.21.39.49; Thu, 06 Jul 2023 21:40:04 -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=qGRN3jkB; 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 S232307AbjGGEIc (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Fri, 7 Jul 2023 00:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232442AbjGGEHx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 7 Jul 2023 00:07:53 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2139.outbound.protection.outlook.com [40.107.117.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DC4826BD for <linux-kernel@vger.kernel.org>; Thu, 6 Jul 2023 21:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KQAziniRAkYTyHUBumjyd5OxbMuh3o7v2Im/KTMRunNCEtHMMV4uPcASPuH/be8LNmqHvz32OvvitSxbtiSTi3fWIC3VVGqWgba1TqMSSyjWlZEHN+Pexw+D4xJEEf23576RoUgUyMEHNbhjgq4GdOg2B6VDqcm+LMwRgGBZM7etz+loxsV29dgq97MceJMJ48unG5PUiEpb8JzeqEFRVpkz1FAVmWhIkM7cKDp6lx9KJMQE0Zplm1+QLxZva40ReraVx6MEaR+fddiV3W/3dXkH/8g00fChxP8z5NSVJoXMqNLqKEIMR1tLw2UWVem+BDEArtxnLMA1gO2rJ9RQfg== 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=W0+iI7AY1yI8a+yrMcuBIJJ035tveqmejoJEjMArvlw=; b=LUslpXhed2Qeu/9w504+d40ZfFK5FYrVLhiGI0VEvHXf+OUProRd+Vd+SHAVFHsw0IjYuVG035JKEZtxsWfCAQ0PEJKS9CqfhS4GXknZ0Va9b+QHh6ZV9YTovFoMJbTcUsl2iCApT3/qUA7fT284QiwjhAbGFYoYtVB5foSGosFYi93f6EuJ8ChVKN5n7jpvsl5JATUcjBoGGFpWgO8FFVH/zXFJHIEUXOyceUJISVwdwV2131DNKdfgvCbSZa2yn/1dm6KzrV684y3p4fQCMlpOfVRY1/RQAE057Wf2ciiIDvDQBTtrK1ANzfjObR31Mt9RhMN8J6qI0l8Y32afug== 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=W0+iI7AY1yI8a+yrMcuBIJJ035tveqmejoJEjMArvlw=; b=qGRN3jkB8GhJ6yHUXUbEyGB32dBUFeluWjdVlhg9g/5C/mRUWaGRO+Gqyt5GZ6AqYlgbn41QDAMCJaBLJp6Uee64rQ1HhuDMqJAhuAwu2Pl4QZao7oXEVF2PnzoS5PQ0DPUkdnbfwOZNjPE4KpL0rQaScwDgOfkXrhY3MjvJDRdHc3TZw8wG7rVIlg4ce+bedCQrae5KtNoBwdwK5bGXGQ28X9dbc4ISguwggUUe+RfYVGfH57XOrX6Y5v0VPDcXj637sooTUBaqHaQXAvwlJ0yuG6qQJn/E3AHORRwuqDYiaDU7lgLNis+kfvg9C/MfvgIPO0++iG5DtNJqbBAH2g== 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 TY0PR06MB5470.apcprd06.prod.outlook.com (2603:1096:400:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 04:06:54 +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.025; Fri, 7 Jul 2023 04:06:54 +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 11/18] mtd: nand: samsung: Convert to devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:15 +0800 Message-Id: <20230707040622.78174-11-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707040622.78174-1-frank.li@vivo.com> References: <20230707040622.78174-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0112.apcprd01.prod.exchangelabs.com (2603:1096:4:40::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5470:EE_ X-MS-Office365-Filtering-Correlation-Id: b1fd0060-9c9d-432c-d5af-08db7e9f9984 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fPAtZTwIVgvRBjNhZqPcU0/mP0XuAiJXC9PaRRCD1MIIbnHZhxi+p2Fe6oFC4FDQr4jVgCSiXU0mdTTGPKWOUqBRCKH6xiTZ42Nx2Rre91U9W+CWk3/Vnh14NAQM/u/JOBZHd5Og3eD/1Hu+ill4lHh2RnL/wZKE5B8PAvLTlD2hlx1dsWvZGoP4ffiaeLntysUSazapgitFNQTqygSBgehJhPCD9Q0924hGlYeJG2OCC6UmAnPgDmlkwyWAAMchIsPNCg5rJ29K4nl1ozqkxLLQu1aHN/vMaG3KCuGIF5Ik5r7yxygI+HqgYeAOjwklnINd4sxbdyDxDb8IiM5aLXZqX3YDfrsFn0JCJfP113vv3h5T1kObKBH+CovNNKyaqlG1NcyiFvggfFnJxBR6c64UxrlYpEP+zqfEdioqrqUNJqMZ7LytPIxecATsNNjoq4Lr4ylqdbdY1owozs/lMdE9Liy+mTHO3olHG13gOWZFkTBcVVtbFf6+O6iJnnF7bm+qsW+z1aghUJ1nzebkj8dz7QuRejOjJaXW1o2zKQaX3qL0PVVLmL6VyrW1kVqEIDDFpA/x9D7izYQU3cVX27lECttClJvvxG/9z7rlJxyFG/y7UcMyDlZwlJoocqY2 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(478600001)(6486002)(52116002)(6666004)(110136005)(26005)(186003)(6506007)(1076003)(6512007)(2906002)(316002)(4326008)(41300700001)(66946007)(66476007)(8936002)(5660300002)(8676002)(66556008)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yrrKd8NvaXhXEJm1qjp6MSCLYc3qGi70xFKH7tJtyJFytwApRLfx+5NEhYx4EZgN4Mp4N2MnEEib/WStpZXUj+4i85RdJyQPxlKBXBNgmT7dK+hsRfmdBucC3T3+0LSmg5O3++lG0z30hOr3WMgmVBGAtYDcMcply5p2HQERgHwHpQUjMvH8X89Suhov+fWOhnlyTBpdoLqM4Mwk7zH465KGw1C0ybhlUxdkQQziqaKfdCBQtTk0y1oJmmtxCBXl9vrDI6lP4xG7UMQpRANXZKcWw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Q1KLbzqnEQmbSYTIuum1FXbwIYi/2AKr2HQM7Tltt0GKE6L9UCdikF5XJhDjfAAnOD++94pLAzBKbcEEJpq/+16Whttr/95VEtdeZwdcSYyhr8mhRXk+zSsTH1Jo79/uDV3PrMwxTzgSvHvbyIlZ6kdoRf2Iwm+rybkqWW9d0BMT9WZhfouV3qMWCA0W8FV+NS/cuw6Wt1LqpnVA/3rbnC/gSIfvH/oAUL X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1fd0060-9c9d-432c-d5af-08db7e9f9984 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 04:06:54.4860 (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: Tmz84jE+1ngclHaZkw1uGw7/IiCaGCgTv4S5VTSmNNHrSsRVMaopk3eKhPOJw33TJwfjNh1vK2HWC7w9ThPeaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5470 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770735328833990095?= X-GMAIL-MSGID: =?utf-8?q?1770735328833990095?= |
Series |
[01/18] mtd: rawnand: sunxi: Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
李扬韬
July 7, 2023, 4:06 a.m. UTC
Use devm_platform_ioremap_resource() and
devm_platform_get_and_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/mtd/nand/onenand/onenand_samsung.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
Comments
On Fri, 2023-07-07 at 04:06:15 UTC, Yangtao Li wrote: > Use devm_platform_ioremap_resource() and > devm_platform_get_and_ioremap_resource() to simplify code. > > 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_samsung.c b/drivers/mtd/nand/onenand/onenand_samsung.c index 92151aa52964..fd6890a03d55 100644 --- a/drivers/mtd/nand/onenand/onenand_samsung.c +++ b/drivers/mtd/nand/onenand/onenand_samsung.c @@ -860,8 +860,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) s3c_onenand_setup(mtd); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - onenand->base = devm_ioremap_resource(&pdev->dev, r); + onenand->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r); if (IS_ERR(onenand->base)) return PTR_ERR(onenand->base); @@ -874,8 +873,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) this->options |= ONENAND_SKIP_UNLOCK_CHECK; if (onenand->type != TYPE_S5PC110) { - r = platform_get_resource(pdev, IORESOURCE_MEM, 1); - onenand->ahb_addr = devm_ioremap_resource(&pdev->dev, r); + onenand->ahb_addr = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(onenand->ahb_addr)) return PTR_ERR(onenand->ahb_addr); @@ -895,8 +893,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) this->subpagesize = mtd->writesize; } else { /* S5PC110 */ - r = platform_get_resource(pdev, IORESOURCE_MEM, 1); - onenand->dma_addr = devm_ioremap_resource(&pdev->dev, r); + onenand->dma_addr = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(onenand->dma_addr)) return PTR_ERR(onenand->dma_addr);