From patchwork Thu Jul 6 04:04:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 116506 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2314691vqx; Wed, 5 Jul 2023 21:53:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlHR/FZAUR6opE62/dWJWpjfSetNB7rSNqu5IwosgNURuNmTrcv1fVjf1fO3F8YKk2+WBa/W X-Received: by 2002:a17:90a:ea05:b0:263:e122:a692 with SMTP id w5-20020a17090aea0500b00263e122a692mr565209pjy.49.1688619199152; Wed, 05 Jul 2023 21:53:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688619199; cv=pass; d=google.com; s=arc-20160816; b=FSR2gJF08hH9zJozkh3CwEfwdxEhLQpS6vcoJUC9WufF1Cjdn8fGvOWbV4Qx1VSe7f bGlO4uCHQW+/cU+gKK0mn2dVynAWcBeiI5Ef4fEQ44S/BOy6ydUgTQihrSBeAXZ8nSKP vU6YfOdxFEXuBRd1MH+J7KDLQITydfdeY3YEKLLGGMbUY8ZNFGGFhFwAn1wPJpeTeYtd 79zTR+2SUm3IcS+lFv5cRQsztrZtIL0P5RppsHTMXSAK1aNLeuGer3kdbRo9HO7ELP+n r4gqaYatXzYEDBzHwxDyBLeqeZ5tmejaeosWptmr7Wsr+wUmqCcp8fU6tMbmQqYeJCuv qXDQ== 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=jpV9uP0KD9gUWTTxcPL/CTt4JWL19m0zAlTBL/ShQ8Y=; fh=+l6ZjXrBwv9PeiVDo10pYQeLGuHErjfvtQ4SY8gs/04=; b=VaUeJcKVgFQwm+QSEqsmfrn3xNP4XgDXIliOztEX2txxwWlTrmJok9dIW+Rnb+SYvS eXp4hVwhOCuIlt//tO7wbaSsu+ABnLgzUvKPx9I/57HGk5lgYgbT+eSzvjmBMYvkHSL/ aW8Cd/0t6hfH99gLSuSxN3eJPF2YZsBbSatEcfSKJ8i1A4IsRF2rE0AK1N+Nobb/A8Z8 hdts1cCkUgJxFYwqRVqljFVGJpu3clX1d13C4F1jMw4jRRXyslGseKx7mt1pcgBqFerM 6cnf0T2GClYeYv1FG5SsUIVG/Xaz88gAzjsPGcExcZJJ5vvUeLy/RcRXLmzF4mOVCMuS lDRg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=gVsc4GLo; 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 z24-20020a17090ab11800b0025943bb2873si786865pjq.136.2023.07.05.21.53.03; Wed, 05 Jul 2023 21:53:19 -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=gVsc4GLo; 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 S233144AbjGFEGH (ORCPT + 99 others); Thu, 6 Jul 2023 00:06:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233173AbjGFEGD (ORCPT ); Thu, 6 Jul 2023 00:06:03 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2103.outbound.protection.outlook.com [40.107.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7FD21FD9 for ; Wed, 5 Jul 2023 21:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MFJQFNvcUDwpuhaaFCULLxdQh7ain0NHsjCF8YfUK2yqds5+gGW7rtxDCqM2QvCkW23W/u1I86X3n+xs9cWjBHaws8Q2AVs8s7TY4D6e9xC92awjMDspSLlms9Ofz7NmIHGv5NqoSj35+3sXFW+doKgNB0w9vLAtqoE0wq+iGxJqvJSmqLHIkJ6BHp2vJE7KD6a/6cAl2aQa/ogxtWERp34mQGvyS5dLXEqUAJcmyKS23kR/OKkgWtotstc/0pHe2t54KF53wJPVOtwcDys8tnpV++xx3DIUBqbtqAZ2XZwT+BsOr9qqb/HIPS9hH/NtJ/xgJ5PUJI/PaPBWYdH82w== 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=jpV9uP0KD9gUWTTxcPL/CTt4JWL19m0zAlTBL/ShQ8Y=; b=QEN9jtZH3UBoHggKs/oNPbStujhPnoGUepSVe7ADrcBb0VqTwtmsxoWwqMvHnS2y/KfW4DbYxrwLC59uZ7/DNzYE6zSjafjibK2biV0jpnmYPUA4WmJDdyvCD4GNzN597RCgUET6K908R5r4NRYB5tBkVEwDOvqvpAE2QAS0rdSPaNwDjeB1ANIBUBq6ANX0ruS7yQc1cwJB2uOndCKCHvo0gZCQ/TD/5nXkpEw2oWlDrMoG/oD8M4jogaoccSVA4VigShMwf7Y7Sj4eWOcrbhXyBEUGMswyk3xXFNFSJ3sbhw8B+J5/lvkFRKK1EnPOe/kty3grY+KqOfmP1pv9Lg== 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=jpV9uP0KD9gUWTTxcPL/CTt4JWL19m0zAlTBL/ShQ8Y=; b=gVsc4GLow7UMce2XzPtDcgpOsXju1/JdQxicTt8bAVzsvOmL3J6ONvSUl6A0wnbsoOD5/MG3zp0kXAvaFY09gciiQVJtNCYZUwd1gRnrhfoaQb2Np8zTUYJq8H9ixxqd+z3tcvcdqn210X4/M/Gd79KL3vXbJ3eJ7OmD+/5alppg3gHIMUklPlHk6GsihomJxjXThR5cqLN8gdqgZKYCd8ddwlnIhzYutHagcwLH3u9e10b/OgciRDiK2ZZ2SEyA3e+B/Zq3rtxP6gLHIdgLqvdfIQ9ZuQYS1xt0zzGHboLsByABrTJv36cmX+mREllU9Q1diEMAIp5ljZb5i7EEsA== 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:17 +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:17 +0000 From: Yangtao Li To: Srinivas Kandagatla , Vladimir Zapolskiy Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/8] nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource() Date: Thu, 6 Jul 2023 12:04:59 +0800 Message-Id: <20230706040504.34057-3-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: 80560b3d-dace-48f9-85c8-08db7dd63510 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EJBaBdx8pWFJOBRyF6SfinUcPyC6xYjEUqjFQIUEzqzaRPBn/Ud9xmagrt9N9/8YZ/isxTxSKjVIEhZUbAbMOwT+LwNPljyoZP1Ubg/3P6WG4rNqT2+RgqoTIhbuJfuTVIzF/aVC1GSmzOkt3K9XP2tDQWCE7vt04sc/L5We3WqSM1Adq53KQV+q6kYiFEimulHY8MrhqZj997+AjJ3xFuNlIVVfbn555VfjckQ0AA2FDNW9wLZkGO5YuDqYrrQKF4FPGqxnByehp4YGN8Z3VuzwNaPHpxXHG7KYhQq5X72eec311k/8Gg03rOQbFHg6fcq9rgWuv+7ZfdMxF5u/RXiTlr+lvSs/1eXl5WcPWb4Es37JYN0v7EGXdUZ4/h7TstvuhL09SPv/275bTVafIjWCvyboW6bOGzTBWrhC6ea251hKQnqqlglHQWTY5WDfSRSwv7enL634hnisn9SEW3dxJMwcZVpWn+CnfxHTT02NVZkugzFYyWjvFZb1x8J49qp0LhP8PVbVgTocEx/NGzAUiF0zDvGvKwj1RKRMRjykh1ls1wMqFdE3jODY0VrLqHNJW1MSZ88QwbX8UVZaxM7Es7Why5vJ/IJjZeHobO6ExoYbj1jLqci5aylfG5WX 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: TVCb94ZAmn2ySh17+cmsaXGmP794DZUB9KuimCMmFv/Q1DEKVfWjxobSI/iJ2jofJ+nr060d3rAY1Y3EMbdm8WqeaRftbS0T+z/D/Q2L0fY7xnxMAcGMumlh0m+cwzTtiHkuhsJWKJ13jWMJ5VA4fr6oLrEpH8jWrTWnTJC3QJTxO0rogm5Z4vh9OrPS2lpgb8Jo9Kv2AQaBBJnI0NDmNqGwYnhtdsuiC6v0RugZtdyMw+Hqlm8eMRKqnTlxrdNW2aLbRjcAIKYhvpfDXTmJagkkc7zzZCOzic1VqTDvS0oGA1sNss3KGPcPVAAWmyaMzt9MhUSaW3cPSXXAsneahRj+rZ00zqvVSt4exmsNzmZmzVaLvVA8waYdOz7g3cOyT2f7mdSuUhyPrAP7k16Zt1gkvSzi2NldAPjHuU1XqksU2BbV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y3XApMB+mDT0ikxloiIJPtKqJg0undHi9XObhLlwXgkMUcaC9hxmWgP9B/ttotMnpB6CaQ4OZY97iIZ450XcVPTWo X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 80560b3d-dace-48f9-85c8-08db7dd63510 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:17.1759 (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: dagmAYdQ0q9qWg2T+E0xiZH/1xCPATtTe52Eanc59Qnf2pQb/oXa1SUK1jjjRdVCQxl5FuENQrZrCdk7kfE+1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB4548 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770645565323362059?= X-GMAIL-MSGID: =?utf-8?q?1770645565323362059?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/nvmem/lpc18xx_otp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/nvmem/lpc18xx_otp.c b/drivers/nvmem/lpc18xx_otp.c index 16c92ea85d49..8faed05e3cbe 100644 --- a/drivers/nvmem/lpc18xx_otp.c +++ b/drivers/nvmem/lpc18xx_otp.c @@ -68,14 +68,12 @@ static int lpc18xx_otp_probe(struct platform_device *pdev) { struct nvmem_device *nvmem; struct lpc18xx_otp *otp; - struct resource *res; otp = devm_kzalloc(&pdev->dev, sizeof(*otp), GFP_KERNEL); if (!otp) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - otp->base = devm_ioremap_resource(&pdev->dev, res); + otp->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(otp->base)) return PTR_ERR(otp->base);