From patchwork Thu Jul 6 04:05:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13303157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 793BFC001B0 for ; Thu, 6 Jul 2023 04:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wk/zlI4rzEne+hGXoBUOMZTyI6ovk2AmOYef/Lygd9w=; b=aT9rJfiJODSS0e VA7kOj08pn17klBjzuKSopPiB6Wg+tdxRaIMEHGpWW9tqIRCPga1FqUyyK+xE/4tak4Wt48+r3Wwd aztN/S9TZZ5mJKQ8lJkM80Mr+YDRcjAFHpQBmMl2F4jyyej3izVB3Wlxc7DMp3k/g2iiW2nEoR0GX kcpP9Pe2NCdiByBqq3TVispbty0XPzKhEZrMBCymu0HZ45aLAqXm81sEl1t5qQGipSijIi07E1Acb UzrwzNE4Ps6Legno1JuSuc/CxWckSK/rih2r7NVe8ElP/ETLPAmiHPRVDj1ccR5TKdONTJrNjB5ye qGVAUnSEBb3dDSFKMUwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHGFR-000K5c-2X; Thu, 06 Jul 2023 04:05:41 +0000 Received: from mail-psaapc01on2070a.outbound.protection.outlook.com ([2a01:111:f400:feae::70a] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHGFO-000K1r-21 for linux-arm-kernel@lists.infradead.org; Thu, 06 Jul 2023 04:05:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A9Z+JYKKEL2Vv4HLnR8KQhN+1Kad4TlnML5GI7rJ0F5W99qWEY7wnzPPiZ5twUqg10IE8/kTzsLuCR1h0O4voIGhMBN647l6Qq4VcWmM45QTwNrHm7ETgwGQZ6DI67VKrL6ekq6RqDnAFqeovG4Y117yUthYuYTPz6Fo5Bo9G/PHZ0MHLq52VhWfibzgxkDsYsMkvc7iJ/6MS8n3v6Nzr0m7WikWTSeymqv1CkoR24DNH2ysZ3YqxnAGPmj3Rxnsqe6h0YDM4qp39da4jXBWamw1Kj+uaam1Srjfa79kgFr7RAWjzobsvOzJXWOvKHoGCK5FAmOsHBPcBu0jA2VyHg== 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=FkTq2z0Iylwy/vekUuST655V8GxepRvM2f0waLcVSBc=; b=K1dBBfi6PcJmLyOFno9V3Fh9QIl+3b4U2rnwoLhduJARDK9cFNstVwoXkrTP+EmDVEhT4cnZny2X6mKpbILwigbvWnEXeT6LSUgFHIJRwCem7bkSj1S2ScZ7h1UXqTpRDNFOoZlBDqDqhQWZgL2eOkinGZxKsIPW50u3FrZghPJjAuBMlibwcZC1iapvUaONO/1DldmVy4jqjpbdM8Ukn1CNPSn+1o9nmHFauXYdC0vHAjONxaF+LDG6KctepnZhDchaL1hv258BF1pm0YBtkGCEdDh/uHn1q6ArGdSUAmUzD6vojsuMT/LZfbmSywhtxrp6as2Ga6KuyDdNhr4XYQ== 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=FkTq2z0Iylwy/vekUuST655V8GxepRvM2f0waLcVSBc=; b=Re6yO8n1RSgF4gwsFI7GiYntydVZwEAlkrNHK0N6uq55BvNmzPNhRlyBjVHjXGAYM2pXZLjAKL0U+WjQhq6QPuoIu9uzaFR3ahVZx0ySZ6aGldb09TGyyH2zGJXbHDcnLrvzplNpAs3KpZI+dsHN6TSVvdXt5ZucoaMzEkrRdKXl+daA34njH1Si73ACTKYhrKRZEFBDkRTgoTR6h+48O5eg+8HVBvzcn45qWNwfw+uR5J9A7Zstj3UY0TpABvHUqZlkYrgdWjQ+KCa2sN5RbJ+lJ/RTwydLODL+7tZH1JdJ7+Y+a6JchxnzSnq1MB0MmP2gzLMdLiiSDpU3eCU/DA== 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 PUZPR06MB4548.apcprd06.prod.outlook.com (2603:1096:301:a7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 04:05:24 +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.016; Thu, 6 Jul 2023 04:05:24 +0000 From: Yangtao Li To: Srinivas Kandagatla , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] nvmem: stm32-romem: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 12:05:02 +0800 Message-Id: <20230706040504.34057-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706040504.34057-1-frank.li@vivo.com> References: <20230706040504.34057-1-frank.li@vivo.com> X-ClientProxiedBy: SG3P274CA0017.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::29) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PUZPR06MB4548:EE_ X-MS-Office365-Filtering-Correlation-Id: 10536c9f-9d7f-4c23-54fb-08db7dd63986 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zmvGdWSODpwVa6uYBPacC0uZSfWoM8RYvrMRWkfhr1dh+GdcBjrgsRVx57pbkn5eeXOk6PMAf43X7bLU/81KjLo2AIecFuddojDdj7AbpkxC+Wy16S8gOQdiQEQBtKwbqb8oX3ch/HSNZElGcCgFdjm+A8Y22ZA+ki88CFYOUMVVdFSlkxevENqp37nsYAx5QbidMTFVNyrqR6+YUfIjnjW7pyH4JxH48sO3mNU6aZFKpXJT7pfLuTO1UgzIwUolN0H3AAIDRbW10PVZ5Ag7fPL+gx3p9NR3o9mh8XcsMVz7eouEvOnYMq9KIU3pRkNdssnr/aTvnA6o4v3W+zNSefjifWB5OgA8cg5Ut/8tZLkXWBzeph9IlTBec5Qn+qPHipLdaqDtoO2ulJYvQfFGGGrlsf+zIDYyEzu/LHEKuuLYGBXCpNqqBlYsAMeugLpJG/8GGxiaobS4ku25yxB6Ppts/HGkVzNp+qRvddRw4vvJjKYI9d9foXBCVxKXpb37QOCJrhUIWog47DmESJFRRt+yoUjihHsWcreyzM/X8ruWFVeGEVa+h8ZeZGufQK610AuntjmhS2OscySzNFVYG7BtKdVdk3Gg7oq/q0SsaAdP7Vj5xiiHcu3sFggaDzaC 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)(396003)(136003)(39860400002)(346002)(366004)(376002)(451199021)(41300700001)(8936002)(8676002)(36756003)(110136005)(4744005)(316002)(5660300002)(2906002)(6486002)(66556008)(4326008)(66476007)(6512007)(6666004)(478600001)(52116002)(38100700002)(86362001)(38350700002)(186003)(66946007)(2616005)(1076003)(83380400001)(6506007)(26005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VOjyVOH10mXYEARadDJ1jc+ecAJQ3+Kz3nFUGilpTNm/WVYBXD0oiylu9QipHU7zNbpxaAU+lYHWeAfdoOcxhvt4ULzRBVE9zR9imnQBaZdv31TcMnNsgGk0QxXjY00YoaEzp4q7H9jE7Sz/o4lEfJLzhtlBUYsSWFwK4ryKnFdhOAp9p38E5+zZK201RdBM537KsK33NkCfOY6N+FVlvDqJPJH1hQT3A1GHo24XwN5KvnUfs9cg12X7S7wgKnXxHHIJVGo8Q6W841ZipNeFT+q1RBtiRyRHoPHMXXLckTQINX1oNtQ0NB0mpD5hERiNj8u59WBTm1A7+5J/ZDvzMCHeVGRzBbEWklRVGP3pV/Nh8Z0juE86+9MsVhRYswBRyhoSw04tG2G74cVHDQhsytuzvMgsrIuzJfkNSreBA2t5SmgiRFBC/tV813cclYLiCDyq0Hht85LsyCudl9R2DPILY135Ay9ra7EQtHCiX+L2e9HUFI9DvGGRWid5dJ4U+q4Eu7vcHVpBoG1UEn4iL7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atorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10536c9f-9d7f-4c23-54fb-08db7dd63986 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 04:05:24.6805 (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: ea/G3s/H9nUYiTxPaFKGIh+CjTXrvMrEfZbPAI9nENf+rYNobzQR38HETKUKLkMwSr+EkydbcdcDDcnN67d0KA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB4548 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230705_210538_670088_A7C8AA9C X-CRM114-Status: GOOD ( 10.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/nvmem/stm32-romem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/nvmem/stm32-romem.c b/drivers/nvmem/stm32-romem.c index 38d0bf557129..0f84044bd1ad 100644 --- a/drivers/nvmem/stm32-romem.c +++ b/drivers/nvmem/stm32-romem.c @@ -196,8 +196,7 @@ static int stm32_romem_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(dev, res); + priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(priv->base)) return PTR_ERR(priv->base);