Message ID | 20230428061109.102343-1-yang.lee@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp728116vqo; Thu, 27 Apr 2023 23:14:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+gorat5Qb7TvdRQOCwXm7WXkd7J/G8hsXdIWAxObYKEjjrHRB2KvyXkEx74z4cUWMI4CQ X-Received: by 2002:a05:6a20:1588:b0:f6:592a:7e3d with SMTP id h8-20020a056a20158800b000f6592a7e3dmr10931452pzj.7.1682662463341; Thu, 27 Apr 2023 23:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682662463; cv=none; d=google.com; s=arc-20160816; b=utkKy/S1wgq0uEYqMUzqVpnjgR/fR0Hdt+M8UleMhOg34t9ZqL61EhLtWEnxukObzC BLvI+/oQo3eQdKODm2E6coqOwIMWvxu7/ddE2yI2U2001vZDKeeyxFNk2PEr3CSDqKyx 4HNnEzXDx2PPbPgQE7Xty8pzxhdbcMlQ/oUDLJnxrVOwdghzmHUpk1a4rZaMU/EIkJJb aknPr5qGhPE4xYzpPla5enUpBKYQuNYB7cTseCeV2JTSRovMA4WEnYPXZN9+qQj2IYlx i6G3wAXL+zeXS6rJNg8FzFSrnPPJ8M0bzKHVGsDTstW5EEqc/DjL8i+LCxgWbnCzsyPP VmUg== 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=FzZ6oCxlzSTyhkAd3fhCJq/N4WVncjFTV94P/QpGglQ=; b=OP56K2FQB2zaEJr8nGX87pAT40FDkqUWWCSLW4SCkxhwreBoSXXLnA5mfiQD87aIi+ mEdPkpnQvktZtlU9UwjFfkgY7b5YAgWvc0Pt8wFiQ1nSvdcn6Hvrl1f/giEUpuuVrdKN DZdKbfG48pNWZnROqTLjuQDBB+h/rDpmIjsHWI3IiGinGdUYP2UjXKmTQddUHD5xpLgR bXJQavmI0Lo8xr7Q6FwwMVwiozSRl3DUX4Vzm1SCY2spfeHanNIJroU7/Ol5vmfNCZ+P e1F0quhRvsHpiGtyxI2I+dNedCwDiUDK98vd3VhhEbjnfkbCRm8GwMr9XGCgrbEkfJ6s 4K5g== 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 o16-20020a63f150000000b0051ae6c4084dsi18406351pgk.512.2023.04.27.23.14.04; Thu, 27 Apr 2023 23:14:23 -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 S1345299AbjD1GLS (ORCPT <rfc822;chrisjones.unixmen@gmail.com> + 99 others); Fri, 28 Apr 2023 02:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbjD1GLR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Apr 2023 02:11:17 -0400 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BEF02737; Thu, 27 Apr 2023 23:11:15 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;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=9;SR=0;TI=SMTPD_---0VhA6GQp_1682662269; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VhA6GQp_1682662269) by smtp.aliyun-inc.com; Fri, 28 Apr 2023 14:11:10 +0800 From: Yang Li <yang.lee@linux.alibaba.com> To: linus.walleij@linaro.org Cc: brgl@bgdev.pl, opendmb@gmail.com, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li <yang.lee@linux.alibaba.com> Subject: [PATCH -next] gpio: brcmstb: Use devm_platform_get_and_ioremap_resource() Date: Fri, 28 Apr 2023 14:11:09 +0800 Message-Id: <20230428061109.102343-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=-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764399474872213823?= X-GMAIL-MSGID: =?utf-8?q?1764399474872213823?= |
Series |
[-next] gpio: brcmstb: Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
Yang Li
April 28, 2023, 6:11 a.m. UTC
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 <yang.lee@linux.alibaba.com>
---
drivers/gpio/gpio-brcmstb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On 4/27/23 23:11, Yang Li wrote: > 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 <yang.lee@linux.alibaba.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
On 4/27/2023 11:11 PM, Yang Li wrote: > 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 <yang.lee@linux.alibaba.com> > --- > drivers/gpio/gpio-brcmstb.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c > index c55b35da61a0..6566517fe0d8 100644 > --- a/drivers/gpio/gpio-brcmstb.c > +++ b/drivers/gpio/gpio-brcmstb.c > @@ -609,8 +609,7 @@ static int brcmstb_gpio_probe(struct platform_device *pdev) > platform_set_drvdata(pdev, priv); > INIT_LIST_HEAD(&priv->bank_list); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - reg_base = devm_ioremap_resource(dev, res); > + reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(reg_base)) > return PTR_ERR(reg_base); > Acked-by: Doug Berger <opendmb@gmail.com>
On Fri, Apr 28, 2023 at 8:11 AM Yang Li <yang.lee@linux.alibaba.com> wrote: > 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 <yang.lee@linux.alibaba.com> Looks good Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Fri, Apr 28, 2023 at 8:11 AM Yang Li <yang.lee@linux.alibaba.com> wrote: > > 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 <yang.lee@linux.alibaba.com> > --- > drivers/gpio/gpio-brcmstb.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c > index c55b35da61a0..6566517fe0d8 100644 > --- a/drivers/gpio/gpio-brcmstb.c > +++ b/drivers/gpio/gpio-brcmstb.c > @@ -609,8 +609,7 @@ static int brcmstb_gpio_probe(struct platform_device *pdev) > platform_set_drvdata(pdev, priv); > INIT_LIST_HEAD(&priv->bank_list); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - reg_base = devm_ioremap_resource(dev, res); > + reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(reg_base)) > return PTR_ERR(reg_base); > > -- > 2.20.1.7.g153144c > Applied, thanks! Bart
diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c index c55b35da61a0..6566517fe0d8 100644 --- a/drivers/gpio/gpio-brcmstb.c +++ b/drivers/gpio/gpio-brcmstb.c @@ -609,8 +609,7 @@ static int brcmstb_gpio_probe(struct platform_device *pdev) platform_set_drvdata(pdev, priv); INIT_LIST_HEAD(&priv->bank_list); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - reg_base = devm_ioremap_resource(dev, res); + reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(reg_base)) return PTR_ERR(reg_base);