From patchwork Fri Mar 24 07:04:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 74376 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp427854vqo; Fri, 24 Mar 2023 00:08:59 -0700 (PDT) X-Google-Smtp-Source: AK7set96aBaxWYL13ki0/qLk5Ha4itzty7W2KulrL47EcMJ/XApiqt+/AB50af/njYRygUFXUNxs X-Received: by 2002:a05:6a20:29a0:b0:dd:f44a:2717 with SMTP id f32-20020a056a2029a000b000ddf44a2717mr2006409pzh.8.1679641739532; Fri, 24 Mar 2023 00:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679641739; cv=none; d=google.com; s=arc-20160816; b=DUxlNxEdACf5t/OWfm6NChRlVJKWkKqJkMXpaOUKYoUTVM5aPSuxXE5JaNbk5sCW5k aZwKb5fppDE+mIhFzE16MOwDIVyRRmH0Uim2TEVWIh8LSK6Hxs86mgOKjn/I/pLcLTKV fVFMuq/ei0x7hDZTm3mXaavuVb8OairxJ8/fA/8s8z7Gnfzp6P8ixKbe9Kziz8wNB3B+ QUWg+VeWMgAJr8Wdy7IlRE0LRi4hYy+QDJNkOnLyc3O68gWRfiRm5vJ+AsBDhoku9SHA CBQPn+HiS+zbdNUMcs+bofkK1x0np+jMqcRHm/LChHfgBAT5eJWk/YN9K5e5oNPn070w doCg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a63de0a000000b005030925d300si20380246pgg.179.2023.03.24.00.08.47; Fri, 24 Mar 2023 00:08:59 -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 S230133AbjCXHFG (ORCPT + 99 others); Fri, 24 Mar 2023 03:05:06 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761232016893339201?= X-GMAIL-MSGID: =?utf-8?q?1761232016893339201?= 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 Acked-by: Jernej Skrabec --- 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);