From patchwork Fri Apr 28 06:09:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 88463 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp734172vqo; Thu, 27 Apr 2023 23:30:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6y1p52nx/97cc+8vKCv3tOTmtX9avXMmvVUhJ0KtepLKJpsWd450IqLkXgIH6gbiNjUlKN X-Received: by 2002:a05:6a20:7f86:b0:ea:fb53:4cb1 with SMTP id d6-20020a056a207f8600b000eafb534cb1mr4584545pzj.41.1682663405098; Thu, 27 Apr 2023 23:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682663405; cv=none; d=google.com; s=arc-20160816; b=W3RjTMawtv5G34JgpipGN/1O/wJvPzHR/35mH62xy955T0tXzmUM5+5So5XLBE1xmR 0FwyEJHvwvfXYqZ/nQSQaw+NtaZjJwOplWTIVnZ74Dv+rHb3mibhiDGLW6UTAPCd3XSS Y/1SkThRhrtPaqx4zsceDkSYZIHUfiw8VYxkriqcEz3qLJPZxvgfwAfCmvxvdKls1hm6 vEIKOwUstzSRWrPnb2DLTFATQlCidTZQndife1Nz54X0d+pn/3FNp1/Bgc4fmfAKhcP4 2ORkhpBA5p6WETnEB/XqKzchV3yL/OoxQ5twFVfGZOdr4WR581JwF917vOp5+xDxJJK+ /RXQ== 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=hSqZrOjP/utOYMnSK5PH2e8mzi+KlcGPw3bsfn59P5c=; b=eJi5P5H40qrk0jeUos4AJT5aqsHJEUOVsgOLgWfP0rC5lz3dhdYVykuu7rnniyXvKg B8Wt09GNz0dbBXzLYgZhD1tsWzGDvwNx+2chB6Z3XatOdcJ67Xt7AvzzKyfeiX4RqFUH pelqx0FOy9QUCI5BFTg0K0S5nkwkNwyDLuZo1OMocyNz3KV48xw0BC0/3NNFFu4ErGB2 qXLChmA/GnItAHqaBELeqee/o/e01eenJf0xAAiHmpSerUSdfBZyBlUkB//Q3gL7OJg4 r3sNtTxc3ZnykMWn4On6SRacvJOGv6PctMhg1VlsMBbp2T7/Yjq8UBtXVOkw+RUWQJFR Z0Gw== 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 h186-20020a636cc3000000b00524b02cbbc9si20201807pgc.835.2023.04.27.23.29.50; Thu, 27 Apr 2023 23:30:05 -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 S1345348AbjD1GJr (ORCPT + 99 others); Fri, 28 Apr 2023 02:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjD1GJp (ORCPT ); Fri, 28 Apr 2023 02:09:45 -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 5732D2737; Thu, 27 Apr 2023 23:09:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VhAHMxk_1682662179; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VhAHMxk_1682662179) by smtp.aliyun-inc.com; Fri, 28 Apr 2023 14:09:40 +0800 From: Yang Li To: linusw@kernel.org Cc: kaloz@openwrt.org, khalasa@piap.pl, brgl@bgdev.pl, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] gpio: ixp4xx: Use devm_platform_ioremap_resource() Date: Fri, 28 Apr 2023 14:09:38 +0800 Message-Id: <20230428060938.98198-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=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham 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?1764400462932114538?= X-GMAIL-MSGID: =?utf-8?q?1764400462932114538?= Convert platform_get_resource(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li --- drivers/gpio/gpio-ixp4xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-ixp4xx.c b/drivers/gpio/gpio-ixp4xx.c index 56656fb519f8..1e29de1671d4 100644 --- a/drivers/gpio/gpio-ixp4xx.c +++ b/drivers/gpio/gpio-ixp4xx.c @@ -199,7 +199,6 @@ static int ixp4xx_gpio_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct irq_domain *parent; - struct resource *res; struct ixp4xx_gpio *g; struct gpio_irq_chip *girq; struct device_node *irq_parent; @@ -210,8 +209,7 @@ static int ixp4xx_gpio_probe(struct platform_device *pdev) return -ENOMEM; g->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - g->base = devm_ioremap_resource(dev, res); + g->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(g->base)) return PTR_ERR(g->base);