Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1660565rwr; Thu, 27 Apr 2023 23:13:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4oGmWm8usvNeStdzweYvR+pmASoOYJMEbBcxBQFcRi/YpMD34GmTUDvDfbRBt1+saR7V2C X-Received: by 2002:a17:90a:dd83:b0:244:d441:8f68 with SMTP id l3-20020a17090add8300b00244d4418f68mr10335435pjv.16.1682662438276; Thu, 27 Apr 2023 23:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682662438; cv=none; d=google.com; s=arc-20160816; b=KHlegduMaK/yIsY2aUN0TfpDG5iGUvAVLNPwT5DcTdCNFrq5eHSRoD47R0w8Mxll/F D7SCx0zoRWzfPcPXcjpXuc7x04Lflv4gOkN1K0BO4m7EYMOLWjUo7KviAythTo73ORaC aqjNL8P29I3ekndbvmjnUtskAwJgse58VWr/wiPBUNZ+H/dHFJQmBsK7yJx86UjucRkG F4EsRYBsUUDci+FSIaPKazKA7D86jNWtD4Q7CeJ3l1OGAY/WGb7gh06k7YIWZ5Lo6dYA ZjFUgdtQtS9USQWcmKmpsYxogJYWa4fryonIwFYMGIHYDqzf+lSHIdP3Hagz7hhhg7By W0Jw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu10-20020a17090b388a00b00246ba1acf0dsi1635031pjb.14.2023.04.27.23.13.44; Thu, 27 Apr 2023 23:13:58 -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 S1345203AbjD1GLS (ORCPT + 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 ); 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 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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/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