Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp691818rwl; Fri, 24 Mar 2023 00:08:51 -0700 (PDT) X-Google-Smtp-Source: AK7set+DfSVMeTkpNcAOhG3HDYgZF5ilcCxiWDF5bfPFSVtLlatHDySffnE18dBYVT5Pu2RndASS X-Received: by 2002:a05:6a20:3382:b0:d6:82a:ab45 with SMTP id f2-20020a056a20338200b000d6082aab45mr2203309pzd.29.1679641731592; Fri, 24 Mar 2023 00:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679641731; cv=none; d=google.com; s=arc-20160816; b=bohlfO79Gzht/Bgw3Jp5mSHe+BfTp3T0gWJAuv2WBcK7l7xzhtJ8Z4DSEU11EvRyOc wVi9+nFAoOINy6xmTvp1rL4SV/Tv+1DgfjsUqVQDxigafI20bYZ8GVgczAz0iejslM/O 8wSECxJ0rDlpTDCXEudG8iA6ahfsRaqNzFzIQ8lXXvasYwooTp/V0Hbd3nsSIduZe/Mk lqwb1DI3/iLalZ0Kavgtc9pHdJrEoCV1B51ehezCku5O+MdvC2upkhekALLF75QPS5MF +4FBeYuPH37IdKe/IUaghBGzu0yoj/9PYYw/uTPfXnn8ILLmr7m+ykNuuxkx8hbxCUs9 7czA== 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=W1WTX0Etuyz7TJltq3tlkC+4bsFKvioGA81cNHhPgig=; b=MLty2LMTh5BDsD3JgCDjqVadGjajN5UspVN9BYJ0UI5jlQoPQ2PvEby9d6NmmTxD8O BcvYfKKZ53yb/4Q7PLYjCbxzO1i5mMRwKY2npRLRWYPjtB1gp3zzcEH8U970SsHLLRnW p7N0MP9asW46AzseCdyBhzswyQqTQzyGobfSeywuCpbJ9TMck/r/EJ6rgtPxqRYjuLbq Ob+vXMj7+NgRzLw7o7fUBoDM5HS9BYJSf6YZVi8hYbGL1bCVF6mGwmVqPR33SjxA6DnR NcTn528PRrjv0J8PczhJ8vCYlmhoXwyGHq/nAGSjVfZGWE6T/oLcL49pcUcRyoas+CLp l61Q== 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 n47-20020a056a000d6f00b0062607fab0c5si18969362pfv.282.2023.03.24.00.08.40; Fri, 24 Mar 2023 00:08:51 -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 S230016AbjCXHFF (ORCPT + 99 others); Fri, 24 Mar 2023 03:05:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjCXHFE (ORCPT ); Fri, 24 Mar 2023 03:05:04 -0400 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42863133 for ; Fri, 24 Mar 2023 00:05:02 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VeWmRtS_1679641498; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VeWmRtS_1679641498) by smtp.aliyun-inc.com; Fri, 24 Mar 2023 15:04:58 +0800 From: Yang Li To: srinivas.kandagatla@linaro.org Cc: wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] nvmem: sunxi_sid: Use devm_platform_ioremap_resource() Date: Fri, 24 Mar 2023 15:04:49 +0800 Message-Id: <20230324070449.8182-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 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/sunxi_sid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c index a970f1741cc6..6bfe02ab169a 100644 --- a/drivers/nvmem/sunxi_sid.c +++ b/drivers/nvmem/sunxi_sid.c @@ -125,7 +125,6 @@ static int sun8i_sid_read_by_reg(void *context, unsigned int offset, static int sunxi_sid_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct nvmem_config *nvmem_cfg; struct nvmem_device *nvmem; struct sunxi_sid *sid; @@ -142,8 +141,7 @@ static int sunxi_sid_probe(struct platform_device *pdev) return -EINVAL; sid->value_offset = cfg->value_offset; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sid->base = devm_ioremap_resource(dev, res); + sid->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sid->base)) return PTR_ERR(sid->base); -- 2.20.1.7.g153144c