From patchwork Fri Mar 24 07:16:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 74392 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp439853vqo; Fri, 24 Mar 2023 00:37:11 -0700 (PDT) X-Google-Smtp-Source: AKy350bAN1zu/4K78THxVOCAKm5XODBHFSPVfZoSbCUmwgtlHsh4XnmtMSyWcKc/TpgtxHjE8HHF X-Received: by 2002:a17:907:8c0c:b0:92f:17d:4438 with SMTP id ta12-20020a1709078c0c00b0092f017d4438mr2179261ejc.47.1679643431318; Fri, 24 Mar 2023 00:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679643431; cv=none; d=google.com; s=arc-20160816; b=DR/bNtDCz2HTuNWs5yGrHMMEfNOvAFkn2pbIVDOB0YE7oPPg2jRvxLOEViq9JylFp/ MI9QLQAMHsF4cnlLrxRa7S4cBmRQkv9E9QHmRsG3agkEqIdBbBlM4xFF4b/H27DVHT0N C2VTkUTMau9h+KkZ5K0byZN72cuO7nV7GYO3hQPR1G725kxW5sH8stcx+Fnj6PUbJ3Nm SoufvuIcJADYEqPlS/327Ii38fuOJtfGzRoQWfiWB1ohBOk7klj+sqYZ8XNBlXFv7aTh sQNr0yKqpDYqtwShF/oG2vnb1Csf69gP9lBfVyii/BW/OzJhAEWtJLEcYeeg8qBZd1lM xIiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=lG+emmxNB6tVjtvj+u6/UlYd9cjrPaGNQ0JEfl5eUZQ=; b=CLeee49ae175cWtmBlmT5YFDveUoKaMqw1jOEMj22PZIsRHfzp87D1dMw+izKDSKeQ 4RtWS3ef9oTqy4gIr5a3EYamGc8A8zhzdYYEIDztzSpa18AmHCa9KdwXfz6OXkQY3lAb 7naditBVT8a2XxOeuiK2sxb/P1i6O/dg0e/aqJujTlahGogB2j28DAyGr7ZW96tSNAoY 3JKG3S5Yi7Gk8Xx13m4PPOdPbrdCpw3bD1GlsHWN42gxsI9n7d+sG5kfsKkGzlnCHOqs oSyXt785MdFxLWAQmEWOcogFDSSuWpH8/Q44zg6zK+WCvKfqmKdefyITVtdjf53zH5Wr qqxw== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd1-20020a170906ce2100b00930861bc40fsi19028098ejb.924.2023.03.24.00.36.45; Fri, 24 Mar 2023 00:37:11 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230380AbjCXHQ2 (ORCPT + 99 others); Fri, 24 Mar 2023 03:16:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230071AbjCXHQU (ORCPT ); Fri, 24 Mar 2023 03:16:20 -0400 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FFCF12860 for ; Fri, 24 Mar 2023 00:16:18 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VeWmWNS_1679642175; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VeWmWNS_1679642175) by smtp.aliyun-inc.com; Fri, 24 Mar 2023 15:16:16 +0800 From: Yang Li To: srinivas.kandagatla@linaro.org Cc: vz@mleia.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] nvmem: lpc18xx_otp: Use devm_platform_ioremap_resource() Date: Fri, 24 Mar 2023 15:16:14 +0800 Message-Id: <20230324071614.26535-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-Spam-Status: No, score=-8.0 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=unavailable 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?1761233790539156779?= X-GMAIL-MSGID: =?utf-8?q?1761233790539156779?= According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang 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);