Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31396415rwd; Thu, 6 Jul 2023 21:40:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlEZQRD39iAUrQbV4FmdO81nG5pVXfpZhjvVT/Rk1Hzj8MOvvKf32Rlsz6fzwargdrPmtMFQ X-Received: by 2002:a05:6870:3045:b0:1b0:3f7f:6733 with SMTP id u5-20020a056870304500b001b03f7f6733mr5539941oau.44.1688704831094; Thu, 06 Jul 2023 21:40:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688704831; cv=pass; d=google.com; s=arc-20160816; b=GcRALEZAvS8lRy+Q1bMITveclYwUFRx7fbjtwI50eNaMVjSRKDNDHW3KDiIvCrmFp6 cFAMRMbS7hzqxFkBOqMjpjp0hPKSPpXTqegwV2YvKOWT9vPfK6PJZ2Qu173jWXwQVM+P 98WIt4YKb+I1Px1yFLvLOKuVcOZkvkaSU6Mf96Cfqavkt5DLPMJ5cPIHx2iYTgtgIx5f jE0DxkZ/9+xakjfaCgdngwQRHkBHWOZarUfY/tV1xhk0yKM/0kJ78UlGUbxr8gotgiX1 57A5GxOacCY8TTfVSU4C2jL5ICyiriQE8tjVVVZVM1i7+bsJAyn43Ssp550p/i9UmidK WvNw== 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=Sls+Na2mUCbEQBglYboXwewsLAk1nUfvVEOplEK5ZVg=; fh=V/t4HE0MWlZFsCBdV9dmci/qx8dk5JuPSODu2Cp0woY=; b=ZYgEk/+0Pdh0BNgveg+zbJp9jMOHj37dcdn6BkYZpEDnKiayc2r0b6b3F8uEOQh6QN 63EcFOx96zeRcWI8PAVsc7BYHLAxOikXqPw4yyzoNqFpY4CZnGIBypJc0I+0Dz8OV4ZG 7GOeDZeECSG4se14gMfc3VBgquy+zlkrtFX+HKiJ6uX9imjrBhCe6LzmFcy/cYysqRIF cuhnUrpv34kmDpJ90IHbiI1TmSSpPCX3/uYEUTgFrQSUC6VrzahNgKcA+NhW2Di4egd6 hFWwYtUYGFd5/Jd/1jOB7LLvS3KzZxhL06T0ovl0EtsNe5NKb1iojQsLXz3mqOuCpTL0 HwTw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fGbAgGqz; 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 m188-20020a6326c5000000b0055b0dcca8b7si2981779pgm.749.2023.07.06.21.40.17; Thu, 06 Jul 2023 21:40:31 -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=fGbAgGqz; 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 S232519AbjGGEKY (ORCPT + 99 others); Fri, 7 Jul 2023 00:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232408AbjGGEJj (ORCPT ); Fri, 7 Jul 2023 00:09:39 -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 6152B2D67 for ; Thu, 6 Jul 2023 21:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mkNsfmQNw9da33dmgg2ll8VVvGHLpqtg2MUKfcsI5hknLFXUR9+kqnIC/5vBR7/n2IA6xuJ0AtUZvWI0dSyoJZeCmmulKncVdK2m+Kap41/RT1L6ENCBW8wVxLDRkJoZvCyfG+ug0hy0D1oXX88hrIh40V6vi/VN+yBnXnLL3npPJvIqfGJ3zdlbQzc51BGlw2U5KoMorneWq5hjeo5gcyCtRkZVtwPzjiccx6EPHLK0ZE0E1/Ns8j53crTRv5FcSpAglsZmPtZZKHs84kXgjmYJwXu6LeEXIhsRsO4qf8cQ6Zi15Vrspf7hop7hDuN4MQWW5rkuAd54DcPuT/bxWA== 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=Sls+Na2mUCbEQBglYboXwewsLAk1nUfvVEOplEK5ZVg=; b=Yo1EmnU9PvMMixFve8FGKkuFcckuSHb7b/n0MBhNc0pDwOlp4yrbuhJ3u/Us6IgV1hdpbBiaByYSVrtL0vk5BfGkNTbNZgTypQQB/Xq9DuO8mBpQzWeD3+AnUwwqd2Rft8M+5W00+ikm19h89YgyDlfcdtVP/Qqn5sCmHU17xm2SJOjFQQc0xZtavHAEjPYf+BfqP+vzZe8P2BqfgpI558B4/VdhwtmYUZOzi6u0trQrleTxilmqxnowDcpXfK+TOrcHI+o5gxJ8i5INYZz7/kHYqivVlU4JgJUxL9Fc7YTYKuboNeRk6fD0k7TK/qLo5CmjVkDN1Jt19nw7utLApA== 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=Sls+Na2mUCbEQBglYboXwewsLAk1nUfvVEOplEK5ZVg=; b=fGbAgGqzk70ZWbWtlelaXkdeHlW+36opAyyRrblpNVT1PsaxsvRGV9kxx2fBEfsV0olrm0sK5jQS8NdW/6mWCGe63N9Pjko17FZ1SwPleMvDGxn5SU+bpmbvb+LIiWDt9v20Stc1szCeHBSZcTmWAIIvBARWMF1lmlIpJaZcwvUSiGZOBZ9+HGlvRSHE2UK0NpVHV+F3XdLK6oredu/SSg7uzqHwR/KdRGnNPzy6yIwhxi/n1IgyNFrnNAyJSqKE8bwHSXDpGHle6kMbyUBgIImQibifwr7rPeDbAFoQ+k5G+uqmuyF9/VRZt9wTCldZLhk38RREB1rX1qrMBM4NnA== 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:07:01 +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:07:01 +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 15/18] mtd: lpddr2_nvm: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 12:06:19 +0800 Message-Id: <20230707040622.78174-15-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: 2baa1dbb-a169-46e3-36a9-08db7e9f9da7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bRffRDcYrPtJPwfappE4iiezeEYre92QO7QZvGjtDtmf7E/OS7/KpqLVKD+qg8ida6y3HmAfsv7QMJMoS6WXwTAA9MSQlVgU8nCEr0dj4tz+nY3/RWUrqn95A0BlItQNjpK01kdS/UuRXriUn0/qeWTIgxZSrEeNFpvfYOQxyWpzLHC5z3L0pRG7HOuB2sPCaXA7byKxBZZRPV3+du/JvOMwiDUYcL9a0E1Zv8xSTtbSXW99HoK9xn0EiTlksTQPQ2pF2cRduTO8hbC5PvFBytbYSOHk14Cjn4+3U/eLlkj1cq4gmC7dN59Y2na2b17GuBFSQ9TDNwHPxhe/MdovATr40nePGrFiOde1cmqmMZsFb5c4oN7NlyfDLlgQ0coTYWoJPeLqIsePGXxOBfFVqyXbHvN/mVqEWo6JgKgJHMucz5gO8ojCX/6/auz9NbMFp9iLurhTzTCyqxGj5UsJ4aNLHy6Jfe2zgZQ4LRgG7BEmABUq8lmXBxVIiJQwrYRlEKZT+GpohdxD7j9lsMKs7qw9WFYcwRK3lxZ5vwx+6jegaEWQFzSsIKpQXMfRvZKGCdu46yVl2iKp4yiz6OfjTYzxOSK+llvKGlcock8EKBf+WLp8XHIUeX5wjG23Vy4V 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?0m8R2xXVeNyPaypWwtbsMXuwTXF/M6rCRaZgvLovrElHzR/tRpR0NBCDEe4+?= =?us-ascii?Q?C6/goHN5dPe8XNcWVCpZOV+4Pm/Tm3tSdwbQMFAneIb0YXeVMKgoh/yyvr10?= =?us-ascii?Q?gJ4M6WsYTn+X23NSC8DJgyEY6pLfECEFhnAS0wXieFjfVsAcOx2mm201cmrp?= =?us-ascii?Q?9bSfMVXmmtYE51/YFDJwRe6StPzBTIUE3PthO8rPIl4iXDASes2EzOH/ExMJ?= =?us-ascii?Q?2kqtdC+PLjUWDDC/wuqIEEgErmBzt0lgIEreKNFPas3iIJnPn2ATbnCnAc+l?= =?us-ascii?Q?xJ98Gt0Equahir0fUUcDizu9ZiJAHZ5keKUvpttVJYEe8dKLC2pEdod11/3L?= =?us-ascii?Q?CLjil2mcoCv0GK72Ac2VusCgyZN7VoZeOvkd/TCbmqonJg35z87Jc0j3G+/T?= =?us-ascii?Q?jYAFjaFQ4jH/blOyUYiFAXRS1WiXtjMBWQU8az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vgyeVKexF+i0ZDauC2/WRVURCay1z49T6bUSZXYwppkmXGb/+T0Vi?= =?us-ascii?Q?b0IgLCvOJgLv6slYxcCPeXD9EU7A8/A7AgrAiLXwa5bC6cztkLby0I2EuLLI?= =?us-ascii?Q?2jpXhqO9Rdga+9o6yHmAzOJ9MGw4Y9W2fegXRJl3QWfVPyneScuehRA6An01?= =?us-ascii?Q?EZ2xI/rrJs8HRMJi428FSA78mWWg/+uUMGlCy5fTBuvu0g2uynTtW8WMVsj/?= =?us-ascii?Q?VvhsKgG2vuPxNg0m/2CEObgHMDyN/woN+JeruG7p?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2baa1dbb-a169-46e3-36a9-08db7e9f9da7 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:07:01.5315 (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: cw+rCn/BVsTD3bPBkCk+WNOgYBcwS8n9S5yY4eOFeuqfjX8f2CtncE1gIod6ScMkoEtrV/PKDt36KAm7t16lcQ== 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/lpddr/lpddr2_nvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/lpddr/lpddr2_nvm.c b/drivers/mtd/lpddr/lpddr2_nvm.c index e71af4c49096..f4e5174b2449 100644 --- a/drivers/mtd/lpddr/lpddr2_nvm.c +++ b/drivers/mtd/lpddr/lpddr2_nvm.c @@ -412,7 +412,6 @@ static int lpddr2_nvm_probe(struct platform_device *pdev) struct map_info *map; struct mtd_info *mtd; struct resource *add_range; - struct resource *control_regs; struct pcm_int_data *pcm_data; /* Allocate memory control_regs data structures */ @@ -452,8 +451,7 @@ static int lpddr2_nvm_probe(struct platform_device *pdev) simple_map_init(map); /* fill with default methods */ - control_regs = platform_get_resource(pdev, IORESOURCE_MEM, 1); - pcm_data->ctl_regs = devm_ioremap_resource(&pdev->dev, control_regs); + pcm_data->ctl_regs = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(pcm_data->ctl_regs)) return PTR_ERR(pcm_data->ctl_regs); -- 2.39.0