From patchwork Fri Nov 6 06:08:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11886143 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 89A6F15E6 for ; Fri, 6 Nov 2020 06:20:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 45FF5206F9 for ; Fri, 6 Nov 2020 06:20:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tCpQkUgu"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="ezQhxO2g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45FF5206F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A3qelPZEoXrNIa6I0KVdmq6sO39zo6kfkklp5KMxw3c=; b=tCpQkUgue4a9asbsahN3tRw63 8l5VcfL4ZnDa8QrX5bEvb9ZVRh7iTrIm6OnU3rdqaB54vGeVnzIlmt+cSawO1Kg23N+K5od/qALeX MOqtDaP9k0EsaD4l4s5VHX0huaHXuYKxixAR/sbLSE+WBuJWShGNuLvtPxAyoAVbfNxcLONbIREDE PupBF982TdJ+zrWoUgkt5k4Rah3fU+BpVs85qP+ZwGU1aXF2vHkcz6LFvcZDz02xfURQpgJMYqFYv qd+E/mK/xpXQ3Ij0UVujZaSvvA6dw3703LNK79h8YZioLGN0WQb7nv2tazoZsV+IkNznDSL2g6nm5 4sWeMZnUw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kav7B-0003k7-MD; Fri, 06 Nov 2020 06:20:49 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kav6E-0003FW-1a; Fri, 06 Nov 2020 06:19:54 +0000 X-UUID: 6efd980687de4b81ab62ae629894bca0-20201105 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=RAGgnDBBxlUMea+BLDILWdxtJ1+gnngFehm4heLDSX0=; b=ezQhxO2gzsq2DUWSG/ZreFsDMZ2Q77WvRufkGzgS5/32kc4tdqd7uX0Umd0hJ8Y6Xt0pUIXPbmpTNwJtoQlMmX7yXS9kE3wzOsTeo34jRuMif/c9+pTOzFIVBVKDdr3Pq+QnCubKVBJVHS9i+dpXRlTvfVd+nJc8vgQdzQb7QKw=; X-UUID: 6efd980687de4b81ab62ae629894bca0-20201105 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 448399212; Thu, 05 Nov 2020 22:19:39 -0800 Received: from MTKMBS31N2.mediatek.inc (172.27.4.87) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 5 Nov 2020 22:10:06 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 6 Nov 2020 14:10:02 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 6 Nov 2020 14:09:54 +0800 From: Chunfeng Yun To: Kishon Vijay Abraham I , Vinod Koul Subject: [PATCH v2 12/17] phy: renesas: convert to devm_platform_ioremap_resource Date: Fri, 6 Nov 2020 14:08:45 +0800 Message-ID: <1604642930-29019-12-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1604642930-29019-1-git-send-email-chunfeng.yun@mediatek.com> References: <1604642930-29019-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 32FD6B92CE71D460B2062F12CC7764D56DBEC637CAE1AB0F201200AE9749D5DE2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_011950_264909_9068DF25 X-CRM114-Status: GOOD ( 11.99 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , Peter Chen , Neil Armstrong , Anil Varughese , Wei Yongjun , Lorenzo Pieralisi , Fabio Estevam , Jerome Brunet , Florian Fainelli , Kevin Hilman , Krzysztof Kozlowski , Rayagonda Kokatanur , Chen-Yu Tsai , bcm-kernel-feedback-list@broadcom.com, NXP Linux Team , Chunfeng Yun , Icenowy Zheng , Bharat Gooty , Martin Blumenstingl , Ray Jui , Sascha Hauer , Maxime Ripard , Yue Wang , Lubomir Rintel , Remi Pommarel , linux-mediatek@lists.infradead.org, Rikard Falkeborn , Matthias Brugger , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Roger Quadros , Hanjie Lin , Ma Feng , Scott Branden , Randy Dunlap , Jyri Sarha , linux-kernel@vger.kernel.org, Sanket Parmar , Pengutronix Kernel Team , Joe Perches , Colin Ian King , Shawn Guo , Li Jun Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/phy/renesas/phy-rcar-gen2.c | 4 +--- drivers/phy/renesas/phy-rcar-gen3-pcie.c | 4 +--- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 4 +--- drivers/phy/renesas/phy-rcar-gen3-usb3.c | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/phy/renesas/phy-rcar-gen2.c b/drivers/phy/renesas/phy-rcar-gen2.c index 2e279ac0fa4d..c375a4676a3d 100644 --- a/drivers/phy/renesas/phy-rcar-gen2.c +++ b/drivers/phy/renesas/phy-rcar-gen2.c @@ -339,7 +339,6 @@ static int rcar_gen2_phy_probe(struct platform_device *pdev) struct rcar_gen2_phy_driver *drv; struct phy_provider *provider; struct device_node *np; - struct resource *res; void __iomem *base; struct clk *clk; const struct rcar_gen2_phy_data *data; @@ -357,8 +356,7 @@ static int rcar_gen2_phy_probe(struct platform_device *pdev) return PTR_ERR(clk); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); diff --git a/drivers/phy/renesas/phy-rcar-gen3-pcie.c b/drivers/phy/renesas/phy-rcar-gen3-pcie.c index c4e4aa216936..4dc721eb9577 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-pcie.c +++ b/drivers/phy/renesas/phy-rcar-gen3-pcie.c @@ -76,7 +76,6 @@ static int rcar_gen3_phy_pcie_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct phy_provider *provider; struct rcar_gen3_phy *phy; - struct resource *res; void __iomem *base; int error; @@ -86,8 +85,7 @@ static int rcar_gen3_phy_pcie_probe(struct platform_device *pdev) return -EINVAL; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index e34e4475027c..1898bbe7c8e5 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -611,7 +611,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct rcar_gen3_chan *channel; struct phy_provider *provider; - struct resource *res; const struct phy_ops *phy_usb2_ops; int ret = 0, i; @@ -624,8 +623,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) if (!channel) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - channel->base = devm_ioremap_resource(dev, res); + channel->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(channel->base)) return PTR_ERR(channel->base); diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb3.c b/drivers/phy/renesas/phy-rcar-gen3-usb3.c index 566b4cf4ff38..f27d6f471629 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb3.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb3.c @@ -133,7 +133,6 @@ static int rcar_gen3_phy_usb3_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct rcar_gen3_usb3 *r; struct phy_provider *provider; - struct resource *res; int ret = 0; struct clk *clk; @@ -146,8 +145,7 @@ static int rcar_gen3_phy_usb3_probe(struct platform_device *pdev) if (!r) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - r->base = devm_ioremap_resource(dev, res); + r->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(r->base)) return PTR_ERR(r->base);