Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp337938pxb; Thu, 31 Mar 2022 06:40:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrWLK/cg7WjI7B7BxZvdA5Izfb/mpSwQSMa9rGRMyunMkEwiGbJvEMYwNvSuuJ486w3Txg X-Received: by 2002:a17:903:1105:b0:154:c850:860b with SMTP id n5-20020a170903110500b00154c850860bmr5168515plh.12.1648734050317; Thu, 31 Mar 2022 06:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648734050; cv=none; d=google.com; s=arc-20160816; b=maIZbknoqJIb3trxYKs02nKs725qKPaPbxo2DFpAA4/BW/UTIH+NT+NODTX6xIegU6 pYQ5ZruyfCWp5WXt8cZI8un2WLaAi70d6Hq7481xbI+xrMJau7h2o6ntFdKSARiSqefi cwOVZQL9ENsFASoP6de1PoL7Zg5T7/oI5pE9p/taGplLnA+tiGgryzObEAIxkSWlgjQY 3qrhuR8x5NzqRvZkdnz0RPclJJ+MUVpBCPAznpNlqaYLAF4XX5Eo5pvQK/rDxPq8hvPf 8NggSbIYggpiXdEI3tSvh+/MggRfAFo8fzOFr8rYSemw6YW1J1JJKjmTb9noTy4qRZPK +5DQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RlYcSnNbJGVZQb/AaBQF/kigapg0Io1o4B7avXY5fq8=; b=KOR7UfPgn5fR7XMtd/hQT/VAqDc+9oxSPBQwStApbI5x5NR9clN81MX9NG2AOoRFTn 9QPzAVTOgNilaH8IDaqsscC8ya5bzO6AE9BS5MLrmQ/siPm7/n7jc1inZG1Uoo7QHoQn h7up0i541/kLQsm16RfWkO34p32h/L46tHmqSjmoPfn5JeVEIa/eaMnh2Bv52rMKS21D Wq/qQ78eiyrysYAAy9RSXZHXhdU1FZMiVHdz1A2O+HnXjQybFGlwKnLTd4dSTHHGePZ9 5Q/grW5md7QO1RagSA4yxjnHTKfoWUBnpJZyj8kNZ4EcciI6iAaHyG1j8R8yhChQMGJI EGnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XM6SE5kI; 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 e7-20020aa798c7000000b004fa8a73c6ecsi23275365pfm.180.2022.03.31.06.40.34; Thu, 31 Mar 2022 06:40:50 -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=XM6SE5kI; 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 S232449AbiCaIAZ (ORCPT + 99 others); Thu, 31 Mar 2022 04:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232416AbiCaIAQ (ORCPT ); Thu, 31 Mar 2022 04:00:16 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 856D113F41 for ; Thu, 31 Mar 2022 00:58:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id 1BF7E1F463B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648713503; bh=QT8DT8RDSeHHXsqt2NV3aXetUMwY0wHmreLUWytxClw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XM6SE5kIFXvC2H6dUFPE2T69kpIzSAljRHXvK2edJsxdO6VQ5J8jg2lFDTc+u0Lj8 CU/8d+xPaP1jeujGYypKNZndtRBzwntKcPxMKYA2y92ISObv7ubamGU5nIldeeVVsB 7SuH1o8MuF1buDq3J+JRvlZ6XfYxjwSz40+kWh7E0tWBV1P/TmZWLAxkXrtIXUZM3S 9ElylOwFFoeIOPxCEvxUFOXMWK8dfGI+EoncRDE4/5nBAS8wevbw+ERY/GZeZROfQ7 h/f/GsFexaN2rSCzZn2mntkUJo5ipW75mbUXFn1xrllEBxXFhWsK2ytz48ESLokZ6v 4VXCbPvhgXHEg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, nfraprado@collabora.com, AngeloGioacchino Del Regno Subject: [PATCH v2 2/3] soc: mediatek: pwrap: Switch to devm_platform_ioremap_resource_byname() Date: Thu, 31 Mar 2022 09:58:16 +0200 Message-Id: <20220331075817.7122-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220331075817.7122-1-angelogioacchino.delregno@collabora.com> References: <20220331075817.7122-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 --- 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