Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1026807pxb; Fri, 1 Apr 2022 02:33:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQgc8XfWvIC1psaR+QFssoIO2MmYejhwlrSnYPAq5Nklja3qinWhjJFcAQvZIpRduVKNWL X-Received: by 2002:a17:907:608c:b0:6e0:19fe:d689 with SMTP id ht12-20020a170907608c00b006e019fed689mr8451829ejc.164.1648805594945; Fri, 01 Apr 2022 02:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648805594; cv=none; d=google.com; s=arc-20160816; b=DojFEUfxaJihEvFFn2cSLjSjMPGE2HHWdqFerC9DnzVw/7fEIugBOtkmQ+U8YZEL0K lOTBrxkSo2nwyYcg5W67Bpz2gzAy55O7T6maoRD5+OJAwUsdHbHT75owpXBDmz45zPwc mXDXA+ZqWIKXGk7KsN6R1fgBGQYtAbO4RIElg/QNfFenj4m4Wk7tVS/fk7kw2KTLQozH LY0aFxHVvEfEPX2NLqytfyDu2ZGAQ1pAhje7aOfOX7qwc7ph5ta+zxMhj4GHn8TZjVKr 01Nmz0LEwJGri7N6zvuKb+oR6nxpa3M12+b2U/otVO+5FrExyJuK+5jpSOVydvGGltXD bT3g== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qVfo70OnNbh//4w0PkPM3bYDjuS6o6mhoGHKg8icHp4=; b=r0PZzGIj6ImsDkgOWhNHPgY7cTnpW/aVmz+ydPGJFKsiiu3UHx3olV761N6MPrKMdv dhX8bFxiwafU9yhdPTw7Kw0QI/zULhiah0O/oANBsYbPNcScMLKFg4QDv/vwpCKSaRRn uapU/y51yJXIPElFWCD8QwFVIg5Sca40jgetWhlas0A69Z+jy3p8eJUWCw/j0aCctUEd ozNhRNhCoq5Qm46DZnmQDtJRtG+P25J+wh7Jt2MzyDz0vSMAfQB3h8tdNrfw5mR1O0ra XfIaADpZslsDV+gaOC/LjEyr1w4sainCD8DL6D3QuA8v0/++255e5UDRjnszmPnuiqVM CWHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=h4bVwDXd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v18-20020a17090606d200b006df76385c8dsi1197196ejb.301.2022.04.01.02.32.47; Fri, 01 Apr 2022 02:33:14 -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; dkim=pass header.i=@collabora.com header.s=mail header.b=h4bVwDXd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240172AbiCaQpR (ORCPT + 99 others); Thu, 31 Mar 2022 12:45:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236346AbiCaQpN (ORCPT ); Thu, 31 Mar 2022 12:45:13 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A0A0270E for ; Thu, 31 Mar 2022 09:43:24 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 4C2071F46FA3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648745002; bh=uT5NxOT2hxMExd4I67KSu5UmcCZGrR+I7Ap+qLmu2RM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h4bVwDXdFftGkDwqukTvYLRUYMaTK0O9R7+SVp/Ajv6ZmQOdgk16pWGvTL8SN5BRT fY5at0sb/yVDCFC48w73x/4JM2RZt0svkWbLsE1Xw+6IDhTZL9hjy5yT1HTNi7GCK6 LC/QFMo2MN/JXtJw2AvWr13rWQ2wM9WM3pLIR39zemHtbaUCl1s9LENeKi9UOZ8/Jf uE8N1MkpeMOnetnQDna6FTwH1lcwVH1kXlzKXoxRpdMwSwwA14uDEtC+LfxDV/4n+z 0K40m3E0JTVigD7X/2KWyj9cS96GGcgjgShr6nZF5GIIEH6iqmjCi2rTI+2RMG5ENn uWGKVlnceG+yw== Date: Thu, 31 Mar 2022 12:43:18 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: AngeloGioacchino Del Regno Cc: matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] soc: mediatek: pwrap: Switch to devm_platform_ioremap_resource_byname() Message-ID: <20220331164318.5o53hxave6yrvkex@notapiano> References: <20220331075817.7122-1-angelogioacchino.delregno@collabora.com> <20220331075817.7122-3-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220331075817.7122-3-angelogioacchino.delregno@collabora.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 On Thu, Mar 31, 2022 at 09:58:16AM +0200, AngeloGioacchino Del Regno wrote: > In order to simplify ioremapping resources, instead of calling > platform_get_resource_byname() and then devm_ioremap_resource(), > simply call devm_platform_ioremap_resource_byname(). > > Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: N?colas F. R. A. Prado Tested-by: N?colas F. R. A. Prado > --- > drivers/soc/mediatek/mtk-pmic-wrap.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c > index 54a5300ab72b..852514366f1f 100644 > --- a/drivers/soc/mediatek/mtk-pmic-wrap.c > +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c > @@ -2191,7 +2191,6 @@ static int pwrap_probe(struct platform_device *pdev) > struct pmic_wrapper *wrp; > struct device_node *np = pdev->dev.of_node; > const struct of_device_id *of_slave_id = NULL; > - struct resource *res; > > if (np->child) > of_slave_id = of_match_node(of_slave_match_tbl, np->child); > @@ -2211,8 +2210,7 @@ static int pwrap_probe(struct platform_device *pdev) > wrp->slave = of_slave_id->data; > wrp->dev = &pdev->dev; > > - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap"); > - wrp->base = devm_ioremap_resource(wrp->dev, res); > + wrp->base = devm_platform_ioremap_resource_byname(pdev, "pwrap"); > if (IS_ERR(wrp->base)) > return PTR_ERR(wrp->base); > > @@ -2226,9 +2224,7 @@ static int pwrap_probe(struct platform_device *pdev) > } > > if (HAS_CAP(wrp->master->caps, PWRAP_CAP_BRIDGE)) { > - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, > - "pwrap-bridge"); > - wrp->bridge_base = devm_ioremap_resource(wrp->dev, res); > + wrp->bridge_base = devm_platform_ioremap_resource_byname(pdev, "pwrap-bridge"); > if (IS_ERR(wrp->bridge_base)) > return PTR_ERR(wrp->bridge_base); > > -- > 2.35.1 >