Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp124362rwb; Sat, 17 Sep 2022 02:06:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7iFEB0yqcSLcfA/GeeaHqpWmF535nl1wzZRR2g6Nggr1MIYSXSDyPStBC1/u3Sngsgjn1n X-Received: by 2002:a17:90b:1e0f:b0:203:2308:2ae6 with SMTP id pg15-20020a17090b1e0f00b0020323082ae6mr9775864pjb.187.1663405575182; Sat, 17 Sep 2022 02:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663405575; cv=none; d=google.com; s=arc-20160816; b=kcpKIWSWUziJHYo4UpVkhzl/p4x1R6WKY91LZsJ4ixiCjDzvnJzywHdy8MnqKYN16H CsBWGiKbLZjlJTHRo2VrzUqOPbfPDiEcVb+bwcAR+IV8AemjtGWrMkiuZ9kOwmEpNk7G hV+e5YRoYFgDiHb8ZIoAZNvLnjLlJ3VmBHXI42NGAOI9Xy6Jdr3qWfUyKX9MMUvxi/I/ VBHeW3uFv4zOFa9OmZGzvs1fwJLPv0tmJ2rHDAywp8vKI2A13R4ORlhZHTTXr55BeJ9j knjYYPYB9G5/3LRB04c5aa2eaxQmv1IBIC8fdvNUKafcaW/n9UEfEOUd6h0c99p6AePI fnJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=U1ZYMMtmYTqqe1DNv/OJxQRYzeBupxfqCLcanKpDT5I=; b=PkrUmov3GsMkzZ6mV1+Q9OaLIkdipHIaFWW3r1jfHVVo3hndVPIzYiu+hyic/GXYSh ZtW9iGRLOHaG4ljevkI1vIJmGd8MME7fslNDETNWA6TbUF8UNJ+cR2gQYae73ZXvne+G lQRvgfEJMwEMLMq8Bvh2mIUI69wHLRQ1sE6I4oItV60+utYK9fGqRO0mwuEgh9KUD82o XsnUL2SIiXOJBS/aFVGzITf/zK0aWbPcngcVoS9xuFjetjZ2dwktPM7ITd/433Nw51JK ntmdhOL0s/D9a/TuF6lsNsI68/jR2h1Sim0FKoF9DZ09T17H/sjoMaVz9nMybY+D9Tmn +0PA== 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f34-20020a17090a702500b002005a1527f5si4717362pjk.29.2022.09.17.02.06.03; Sat, 17 Sep 2022 02:06:15 -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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229498AbiIQJBl (ORCPT + 99 others); Sat, 17 Sep 2022 05:01:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbiIQJBh (ORCPT ); Sat, 17 Sep 2022 05:01:37 -0400 Received: from sypressi2.dnainternet.net (sypressi2.dnainternet.net [83.102.40.154]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6F2E2BB2F for ; Sat, 17 Sep 2022 02:01:36 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by sypressi2.dnainternet.net (Postfix) with ESMTP id 2141D120E9; Sat, 17 Sep 2022 11:55:24 +0300 (EEST) X-Virus-Scanned: DNA Internet at dnainternet.net X-Spam-Score: 2.975 X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.6 Received: from sypressi2.dnainternet.net ([83.102.40.154]) by localhost (sypressi2.dnainternet.net [127.0.0.1]) (DNA Internet, port 10041) with ESMTP id u9GGZTBquAQY; Sat, 17 Sep 2022 11:55:23 +0300 (EEST) Received: from kirsikkapuu2.dnainternet.net (kirsikkapuu2.dnainternet.net [83.102.40.52]) by sypressi2.dnainternet.net (Postfix) with ESMTP id ECA6B1AAA; Sat, 17 Sep 2022 11:55:23 +0300 (EEST) Received: from localhost (87-95-96-237.bb.dnainternet.fi [87.95.96.237]) by kirsikkapuu2.dnainternet.net (Postfix) with ESMTP id 70E5F3BAF; Sat, 17 Sep 2022 11:55:16 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Sat, 17 Sep 2022 11:55:16 +0300 To: Yang Yingliang Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linus.walleij@linaro.org, p.zabel@pengutronix.de, horatiu.vultur@microchip.com Subject: Re: [PATCH -next v2 2/2] pinctrl: ocelot: Use devm_platform_get_and_ioremap_resource() Message-ID: References: <20220917024634.1021861-1-yangyingliang@huawei.com> <20220917024634.1021861-2-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220917024634.1021861-2-yangyingliang@huawei.com> 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 Sat, Sep 17, 2022 at 10:46:34AM +0800, Yang Yingliang kirjoitti: > Switch to use devm_platform_get_and_ioremap_resource() to simplify code. Reviewed-by: Andy Shevchenko > Signed-off-by: Yang Yingliang > --- > drivers/pinctrl/pinctrl-ocelot.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c > index c672bc2a4df5..d2c144611d4b 100644 > --- a/drivers/pinctrl/pinctrl-ocelot.c > +++ b/drivers/pinctrl/pinctrl-ocelot.c > @@ -2073,8 +2073,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) > "Failed to get reset\n"); > reset_control_reset(reset); > > - base = devm_ioremap_resource(dev, > - platform_get_resource(pdev, IORESOURCE_MEM, 0)); > + base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); > if (IS_ERR(base)) > return PTR_ERR(base); > > -- > 2.25.1 > > -- With Best Regards, Andy Shevchenko