Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp693349rwl; Fri, 24 Mar 2023 00:10:29 -0700 (PDT) X-Google-Smtp-Source: AKy350Z2pcA55fpeBt7ROoh/uShYdgIYx+CiRwDGh9EyIjLPwUekW8RMbLIUNHacLeyrIHzQT/cU X-Received: by 2002:aa7:9597:0:b0:627:df8d:350f with SMTP id z23-20020aa79597000000b00627df8d350fmr2158154pfj.4.1679641829462; Fri, 24 Mar 2023 00:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679641829; cv=none; d=google.com; s=arc-20160816; b=eEweShX6J70euN6Op09ISlHpE+Kohrh0IWAQOcDXHemCGuCzTGbIMCGQdhRZsdlm2d 9QTYHDD2Z4vHbtyzK1HpIreKHZJT3a4PJG7prxYaBwia/nX6k48nPlW1k3KqrlsMalur Is69xr53/m/zmb6/EDm0Ghg37yoB5lJubpLTs3edkVzvAV2zQdYiobFK4gXH2iMpm2R/ qgUApzoNLXP4GPZF+M5wxU49bR9SMMNtYHbQcKeg1QHny2BbBw2CC0lMMCj7lsRjT5Jp 3osuh7WuI1jTUyUo7tGC212c40bqAB5l3jT70ablnva37ODj3KQrBRVSlKquUNwGRd43 1aXA== 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=s0KfKSRQycj+VjewUM9DFGUkaFOX3gOZvlnAGhZeJFY=; b=YsEn4IWFV2xsr5U9kKNlY0NjDKlYE4hDaCCUftEQii+r2iCxcz2gMh70QewReyKL9N ntlcRjk60wXdnkAkwi3Kta4V7+WQTMDZ+fbxKJ6YM2hxITGvp15Bc3YlNjNAf6b0jx4a yDqaJOKVB3DRSatcfM1hDD3d2RoP3I2dJ06jy2fU0Cry5g1ZNiIqT/bntHcOumNKk9az OE2un/6k3rclgY/B0s7IkBI6CUsv/UNCEPSRqaowAj1X/9UpXvSMLyeVczM13W+0gmLm bUl4Kt3sx00i8T10S/sGDronnK6x4ozzpr8PjGF6XRjiPAu5xVasfAyxaMZgSgRPSW+A qfAQ== 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 85-20020a630158000000b005132381cfb9si1035794pgb.614.2023.03.24.00.10.16; Fri, 24 Mar 2023 00:10:29 -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 S230404AbjCXHIS (ORCPT + 99 others); Fri, 24 Mar 2023 03:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjCXHIQ (ORCPT ); Fri, 24 Mar 2023 03:08:16 -0400 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34D321BD8 for ; Fri, 24 Mar 2023 00:08:15 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R851e4;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=7;SR=0;TI=SMTPD_---0VeWlj-U_1679641691; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VeWlj-U_1679641691) by smtp.aliyun-inc.com; Fri, 24 Mar 2023 15:08:11 +0800 From: Yang Li To: srinivas.kandagatla@linaro.org Cc: mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] nvmem: stm32-romem: Use devm_platform_get_and_ioremap_resource() Date: Fri, 24 Mar 2023 15:08:10 +0800 Message-Id: <20230324070810.13012-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,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 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/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); -- 2.20.1.7.g153144c