Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp750848rwl; Fri, 24 Mar 2023 01:11:06 -0700 (PDT) X-Google-Smtp-Source: AKy350Yu1fTPV/t+KAOUn+E53aEHwF4zFaP6b5o6vgTgGkTo6Vk3UHtQ6lvkzaMtdHlNPRKHDMOZ X-Received: by 2002:a17:903:3013:b0:1a0:437c:4e82 with SMTP id o19-20020a170903301300b001a0437c4e82mr1563400pla.13.1679645466516; Fri, 24 Mar 2023 01:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679645466; cv=none; d=google.com; s=arc-20160816; b=HQ98HZj3tFQu4KU83e2+mMty52INTbzYY5+NnAyJBCIGIdU3sOQMwiUWj2GL04+C2X 401HXOyA6UupFvOUY6F9RmYfYPrzyVaXBFp+aXfqglWHvuQmJYkpZLVafkfuawnV1k3k BN6MwwMqhOhDlLTtxDppGVCglpviHj9IRTC++LqEZq0z2Dv385D+jh0a8fnjYHFjJzAo pMek/za3PYGq1qm2DYJi9hSOWprsEEcu6023rwCqSADAEPPx5ZtV/hsrWulYDQntyRgo SBfJRlU+Oo0IvxloV1H0o7cJksZOiM41rvz23QhxRMbUixXCoTcJxMv6y7tkcDLQVnJh eLyQ== 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=D5L2WAd10Sm60fZNW499K+3RqfOZHzVZvZoKPArY5PE=; b=CrzamFUjJyvW7eL5zAlZtW3z3qLRAV9fitUcExQgX75NGYwGB8nJ8RDHmSZAm2vm8w A74KuvYhJWGJGhaozRFiDakYNHgV6gx/Qqu/T1GEXmBz7SBqfb/BghwJ+1NorL3J6z6B nqzQtU4eSBRgULHsz+6qS0Q4PQrK9C6jzhtF0u7iFX7CNwYJWnoDsAJweus6XxlqTtLI rjnnxzY9u3u5f3/UvKs/f9fm3d9S9zlW/OLBGHgAosU/fVUQ+tg65Uj/D8NtlLI6oNou 8Uzmsy2HjEsZGymapF6vizyyYJjHEwnKG5JGnWt57beMPRWU81zG+h6nflE02P/c94Zy ueXQ== 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 lb13-20020a170902fa4d00b001a05a17d067si13666985plb.468.2023.03.24.01.10.48; Fri, 24 Mar 2023 01:11:06 -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 S230153AbjCXHyR (ORCPT + 99 others); Fri, 24 Mar 2023 03:54:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbjCXHyQ (ORCPT ); Fri, 24 Mar 2023 03:54:16 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 292A755A9 for ; Fri, 24 Mar 2023 00:54:13 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R721e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0VeX.zCU_1679644450; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VeX.zCU_1679644450) by smtp.aliyun-inc.com; Fri, 24 Mar 2023 15:54:11 +0800 From: Yang Li To: srinivas.kandagatla@linaro.org Cc: linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] nvmem: qfprom: Use devm_platform_get_and_ioremap_resource() Date: Fri, 24 Mar 2023 15:54:09 +0800 Message-Id: <20230324075409.80168-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_DNSWL_NONE,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 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), 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: Yang Li --- drivers/nvmem/qfprom.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c index c1e893c8a247..cdeaa93e80db 100644 --- a/drivers/nvmem/qfprom.c +++ b/drivers/nvmem/qfprom.c @@ -374,8 +374,7 @@ static int qfprom_probe(struct platform_device *pdev) return -ENOMEM; /* The corrected section is always provided */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->qfpcorrected = devm_ioremap_resource(dev, res); + priv->qfpcorrected = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(priv->qfpcorrected)) return PTR_ERR(priv->qfpcorrected); @@ -402,12 +401,10 @@ static int qfprom_probe(struct platform_device *pdev) priv->qfpraw = devm_ioremap_resource(dev, res); if (IS_ERR(priv->qfpraw)) return PTR_ERR(priv->qfpraw); - res = platform_get_resource(pdev, IORESOURCE_MEM, 2); - priv->qfpconf = devm_ioremap_resource(dev, res); + priv->qfpconf = devm_platform_get_and_ioremap_resource(pdev, 2, &res); if (IS_ERR(priv->qfpconf)) return PTR_ERR(priv->qfpconf); - res = platform_get_resource(pdev, IORESOURCE_MEM, 3); - priv->qfpsecurity = devm_ioremap_resource(dev, res); + priv->qfpsecurity = devm_platform_get_and_ioremap_resource(pdev, 3, &res); if (IS_ERR(priv->qfpsecurity)) return PTR_ERR(priv->qfpsecurity); -- 2.20.1.7.g153144c