Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp702205rwl; Fri, 24 Mar 2023 00:19:11 -0700 (PDT) X-Google-Smtp-Source: AKy350ZI41uDz9X4gsJnmtqyKDCuvrHUXRuy+LTjqVwZrRLRcO3oFHud/lt//1kqP2RK4HywWns5 X-Received: by 2002:a05:6402:5178:b0:4fa:57bf:141a with SMTP id d24-20020a056402517800b004fa57bf141amr2558472ede.32.1679642351368; Fri, 24 Mar 2023 00:19:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679642351; cv=none; d=google.com; s=arc-20160816; b=Cgq2oRn1w30P3PHHUu+9terxdKwC1GigAg4V95MJeCFgnZksBu5igX8/W2A3EkJjIa 7XgZALL+DB7uRXTwNMyzwJjL7+huTlbl+fxXA14RTeKud5ASNROeiHpP/d89nEIp250m cRGirhtI4r/iYswcm0GuESYNqLZBg5g+EyLTig/RIY1Y5tiZ95uKcZWCKIvhI/JGFUF6 IAqW4A/sBR/RpqYUc0TWEn6tWzLi8yK0a7ilRpWcm6xMg2DUSfLzmlNPfPCX37OUvvtI zihwT+F8zFJtR6ChkWFhxw/T0zX/ET0kbVi0naGje1GPNN43fazzhgeOyDBJEPO42WZ9 yUMA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r12-20020aa7d14c000000b004acd34e9368si176862edo.187.2023.03.24.00.18.46; Fri, 24 Mar 2023 00:19: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 S231438AbjCXHQ1 (ORCPT + 99 others); Fri, 24 Mar 2023 03:16:27 -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 Content-Transfer-Encoding: 8bit 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 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); -- 2.20.1.7.g153144c