Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31370796rwd; Thu, 6 Jul 2023 21:09:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlGe5gxWIIWMeOpyo2kQpG+DGVVfXFqfXSpr6b0017LKunjlsOcR2m2TzHU0fF2v8PRRQmME X-Received: by 2002:a05:6a20:4325:b0:117:3c00:77ea with SMTP id h37-20020a056a20432500b001173c0077eamr6511366pzk.0.1688702978575; Thu, 06 Jul 2023 21:09:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688702978; cv=pass; d=google.com; s=arc-20160816; b=yU+PZ/+ZsVSV0f2krjBobMCoXmbFV5Rfc7d6JLqwH/BxsFCVeoZwdq8aClSOZ24vHz NIs43aVmud+rz3GkI06CVqf8H4KZnxTbPHzjHJrNHkDDAQfrH9knswUYK6gYX+dv0AH/ tEv2A4qehePIPZGAepaxqvF48WghkPkHM0Ip2a1EL27ilFXTEPkEBnxNgOdfXzNXho98 gMzq7FLA7mIS7eJ13VE8HjSf6/37PXcyvFzqZQhIY/zE/82KjJnxo09+WcDB1ULjm1c+ 2PHcYpjgqY0cMW/MJ5XPx3FX2em3vaDtrl5R/UcepNWIOPfLz+fSF1GqTCxowdpTfUfM xdvA== 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=ipUKdMlVF+i+Cwge672wAT5nGsYk9M+cH8Qu2fYtoc8=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=yqCt+a1GRve+H/NtoOF+vXiXLaGr1J5/tz0FAWyDY26H4vdsVuURc2eWG1tREV4B0K c6jgCp6w9ClcGq+fEBULD6GLudYR7NkcmDGAbewleCeNazd9TPDwNiCPJ19J2837QLvO xxshxlMJYxsS31UncfmlTouKMp3qp2V9pW6/yC7DuecD5O0YfhN5+S2jn5GKihKCObyh jt391XzcIenKNojwJlTZjnuG7jApmDcufGoMs45z/W3A0TZv3Gf6ZcRZRHDphH3NFFMC GqmsfHOMpK/VgfSC5u3ldThjGlOcPT79HZgzGXzpUJoCvwyGf1D7MRTo+mZji3SoQi6E Hj1w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="Y617a9/n"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a63570d000000b0053fee209655si2798350pgb.664.2023.07.06.21.09.21; Thu, 06 Jul 2023 21:09:38 -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="Y617a9/n"; 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 S231737AbjGGEGv (ORCPT + 99 others); Fri, 7 Jul 2023 00:06:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230130AbjGGEGl (ORCPT ); Fri, 7 Jul 2023 00:06:41 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2103.outbound.protection.outlook.com [40.107.117.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBB2B1FD7 for ; Thu, 6 Jul 2023 21:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iq6ZUCQ6KzGF1jUOdO3UB3fzUE+ltEdAGYLzLgraTL/E8FCe5rR6bQ5B14hJlmnXHD1Zl6rzg6iKHg5Yhv+9lI/l72dh4M5xW5+p3mmuC/dvSmr+LvQOhbUsTFsPzfhLXI/AV2b8QkYwRJbEaO2FAf8uqggx43f+SeUEsXIgFI4/VXrbeSp6ZCc+41gAWt6dPjyg0Ov0/ZONVYqAMJAvdVpsp5S19d8fBa/xv8BcU7uVyooJVc+7Ud2QnUANfm2zSvU34j7+swi6KwOHB2J7HEau9HMoNqZNGws40cKqxfH5+DBrhT9qcKppAelzElUkXEj5RZhKX8T19lLrG1vIHw== 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=ipUKdMlVF+i+Cwge672wAT5nGsYk9M+cH8Qu2fYtoc8=; b=L/141FFx+/xbBpbpmuplMxpDb48l5esBDlR469Vzis5ZXOU2Lf87KXOc1kuTysy7tbYdr+2mCwKmHOn+wbCtIRcavyQwiLW5KpzfZMs7rlyyq6vJvaPAfh9cDjHll4afpNrCSupftrDr8sp3hsL3iBHKSG/Enyrjp8jcZmAfIyvSqhZRoXLp9hdcP2cHSaMfNWPOpc7OqhaqgN0oIgIQf6BX8fofBkseDv6J+wXCmyk6dV96KLc7nQKpjy4kJEOa/Yrmct7mgHXr5xsA98SB+qRfXbQwdGcG3FitCw0KYTY/fVWkGVCpEXCJwkdu3IUISOxArhug9hJqvii3T5xzpg== 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=ipUKdMlVF+i+Cwge672wAT5nGsYk9M+cH8Qu2fYtoc8=; b=Y617a9/nMhE+p7J+PViNEyBBuxAOhG5wgYdbvekle262Zdv5f8O9E/rKF/OTWTv/492ntyVDfJQgmh08Kh0C5V2Ua34AcYPoiImIHahrz0BbcGQLOk/fo2WqT8lIRnKw+jBQ4EHmHDVCPP7YZ+nPM3B7CUsW5Onm12gTkSoC7R777qZZJQ60xJG3bJHeSWv+Csg2bvdqkhaTW/Vlm52pluwfjLYCCYZwyLMnpZ1fhr/zfcVuyg6E8pvM5DcwRvPO7FF/ek/UxtCsWaGQZ8af+66Ntc2yvRnyL/fL1XGpmpb4oUKEou+ANBRDdmrKOPrRQStbsOSmo43KcLxvK68D1w== 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:38 +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:38 +0000 From: Yangtao Li To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Yangtao Li , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/18] mtd: rawnand: mxc: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:07 +0800 Message-Id: <20230707040622.78174-3-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: 29b62914-ffa7-4811-7434-08db7e9f8fc7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BXcewIYhCT5SBdGXf7eTrqDHtmqXZdCrL8cn1cGUwJCv6oNTt2tHY+He2Y0QzwOVDCsk7Oqc19OlqBXlw46Pn48SNBND/vtcrLomTwexpOyjYfnF7344P4NLfKFsKPQqzFpRt3kuju7XktXQkB6iACUXrDwIK1ag+j6H3A5GzHnA+nOwlClP+sJ8YJETgo+gf9+pA2WR2MTHsaAFAxYhvwASM7x25JFyrLCkPuV0FkqhJhfAPNaZ71n2FmoKmnCZ5w3x5EAGrWN31aTvNXKjQxhZxElU3ULYmJ9jUECyWYuF+jmaK5m79HpHTS+EGzzRDpnAWjc6K+tghg12IXi48MYDXcBKKekMn0v5UNv+uMRtJmUQEP1zBt6b7TNvfwwk5MUG6GQ68zTtdxDfNLFDzwS2dkURpjNyaLuA48uOsKXuqFMVKvXV7Drf/Vp2qTyuMKcy9vn+qbs3odHPcNdJ55Qu4ll+l7fwg5cksOrkIJO6yx4lFHn2V/qy7GgP2HOLFJVavCxZxrumGc87W8F29JbZlqx604L8MarqLhcLrBZoSE1WElNSOPWObNWnSgu1CtTtgEyCZUpWH252789bsHsb+QaCa9SmBjgDczfj7m5+dEvLlY0tOsJ/O1DP7up1 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: =?us-ascii?Q?uD53sLu830oollqJIbL/ItoltrZiWGz3EHwgc5MuE/Vm1UiWn2ZIPRECc+kc?= =?us-ascii?Q?LKg/wPQXLWmR6JAF5P4CoF30jKNQt4/xlJIxfJJSusksiCWcyPexj+T3YwsP?= =?us-ascii?Q?ZxBGHSivYVaqAJpPVsMM+NH8wCZUxVSSfnzO8xRZ+9NMzmMkIzsx0lsTlfuc?= =?us-ascii?Q?Tt6V5N1RTpOvJ86OZ151RFeA78yT21eriP7Aw8jjlpU4SSmgvDVH2WfArH3T?= =?us-ascii?Q?tKDK8rJyidEbatUXfktUvDG6fbkkOJ6hOdgMkUs0DpdYKoPkKH+rCeMBBBfP?= =?us-ascii?Q?O+/mn0ZArqiE3KMjtYLL+TysfsjuSGt9odiFAEf11eU2mQa9mi7kt9hO35gB?= =?us-ascii?Q?Q+/76VriTF18ZlGcodtNTnblELdaFksmKF/U/hFxzwQRetZofKpVCBPAXoMf?= =?us-ascii?Q?svkuQPmP2ocKO4OqU/V8Yv9rhUfqzg1kRPhYHGs877jFZ254rQrPrjcgCVxu?= =?us-ascii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1WO+cOU6Ylngvk0Np?= =?us-ascii?Q?mZ4YM/JvcLBmrT3c2qgQQwHvsQ8CxdsGDPlOv+HtWKk15BSdIoh9KuuuBcsg?= =?us-ascii?Q?Inv7urgoxm2Trdf45opxWuNNoS8zHoXJg0ELxJcKgT9t3XjwoELbyEAs5kIP?= =?us-ascii?Q?ju6GcfXvS2BRE4kgLnKNZnxoSA7NCmRdYuk8BMV5TWA9S3NUxT/SjiJY1m0S?= =?us-ascii?Q?Cs4KtdovzS01veUIC9R4mRtQHAJ6DMjslLb23dQb?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29b62914-ffa7-4811-7434-08db7e9f8fc7 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:38.2013 (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: rwLne7y8IAW4KsMaQ7Frynd5BQ0YdST44/ZM16tWUXEQFID07u9UKq+vetsQt7uuGddTFrnCkXkO+miBxFg9Rw== 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: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mtd/nand/raw/mxc_nand.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c index 3d4b2e8294ea..2f8dcda0f435 100644 --- a/drivers/mtd/nand/raw/mxc_nand.c +++ b/drivers/mtd/nand/raw/mxc_nand.c @@ -1696,7 +1696,6 @@ static int mxcnd_probe(struct platform_device *pdev) struct nand_chip *this; struct mtd_info *mtd; struct mxc_nand_host *host; - struct resource *res; int err = 0; /* Allocate memory for MTD device structure and private data */ @@ -1740,17 +1739,15 @@ static int mxcnd_probe(struct platform_device *pdev) this->options |= NAND_KEEP_TIMINGS; if (host->devtype_data->needs_ip) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - host->regs_ip = devm_ioremap_resource(&pdev->dev, res); + host->regs_ip = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(host->regs_ip)) return PTR_ERR(host->regs_ip); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + host->base = devm_platform_ioremap_resource(pdev, 1); } else { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + host->base = devm_platform_ioremap_resource(pdev, 0); } - host->base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(host->base)) return PTR_ERR(host->base); -- 2.39.0