From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 497B8C433FE for ; Tue, 12 Apr 2022 04:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sgBbn4jHVXsbTj1kQ/U9MEpl51FWdDrJ+jdpHmgkkDw=; b=qJcPBw759be9F4 5G/2X3Q76Rs8OR4Bg7e0+Ua1fLQZaHYNKXC346Miz32s+94mvrXDWHOlx8D/wpLlD3pBgTyKhatV4 /FxPT/i/KdI6/lm0KiYlcOxHqCYSyeKf07Zu8OsNt8nN6cfqD0DzCWMHhLKFX2mfBZCJ+QRhWH+No lx0E2LPGNU0YhfTKEJ9/lkbdnnbmlg9ECzwsdAtFW1G5pgH+eZUPiQ2mR5Nc5TsNS97F0ehBGEVD/ EL4KoCBEDBRRDXeoW7yVauQFFPhw/AhckfkomZ1cWbLoWb9bFYS9Y3IgGzIMZMoSF1ORdk8AW+jB8 vy1/F5HGtsaRAjJWD4pA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ne8H9-00BbPN-N2; Tue, 12 Apr 2022 04:37:12 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ne8FN-00BajO-LN for linux-arm-kernel@lists.infradead.org; Tue, 12 Apr 2022 04:35:23 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 7A387320187F; Tue, 12 Apr 2022 00:35:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 12 Apr 2022 00:35:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1649738120; x=1649824520; bh=nm KRP/ABfQcqmBycE/L70lVGYqQcz1ma/r1ejzxPxFk=; b=BYQzVtuZ/yZ6tZvfZv shuOdxt9Hl7tqebK/azOKm0dPdUnMNJbi4qjYDY2e7H7rUR7xR0BqoFqr+7oXLPh ELXW81sNHoLsXMR2POkSe7gcK4wKSVD0MGKg5yVU31bz5cDhpHchLDTf4z8N5aVU 3kw4QSHotf8TV3HOhkvijmeGjluWctz6eNOu1qdIKPPS8Aa1kHMWZrTqUiQjVmYL /TN6uYZ8pVtDHAiUfQC2wMhqR87fJ2CoA3PPx7PTOTGTFAOBZNtEPI5zi7g/hJ7i fU34jP764fsWrfjqqHJHU8NHestJbMr0apj/7HiYIyODFJFEi98lpBF1DzfAQiAl hJxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1649738120; x=1649824520; bh=nmKRP/ABfQcqmBycE/L70lVGYqQcz1ma/r1 ejzxPxFk=; b=GXkXgMvujAqVu9e0v4TEt22iTDNW+TdLkDsNq4Wx1YovbftmwOX l4UtwWBpQiAiADpU4wOMPHYdJx421/DTPB6S8MgszZdrCCrWlI5Xi1jAD0md08Ej rji/57y0DiuY8d+gjMthPpJPUlqrx2S5Jb4tSPcsRbh8b1+5MERdof2c3ZMb/Akz buA87E6Z0Ailrf689Dkdca9WM4QKhbXwkhO1qAD8Dp2utyQvSs2dj/Ur4snQQW3Z Ny5X2eGV62A4K2IIs/Gb/9BWFdPANgb2UCJKbRdR0cpPZY4xlNvNPbEM86Rb8ZoW 9A8LYbXDFhY/W7PJPdPJQJxEiNosqR0giGA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekjedgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Apr 2022 00:35:19 -0400 (EDT) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , Maxime Ripard Cc: Samuel Holland , Daniel Vetter , David Airlie , Philipp Zabel , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH 2/6] drm/sun4i: sun8i-hdmi-phy: Use devm_platform_ioremap_resource Date: Mon, 11 Apr 2022 23:35:07 -0500 Message-Id: <20220412043512.49364-3-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220412043512.49364-1-samuel@sholland.org> References: <20220412043512.49364-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_213521_793350_054E182B X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The struct resource is not used for anything else, so we can simplify the code a bit by using the helper function. Signed-off-by: Samuel Holland --- drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c index 7b901aef789a..1effa30bfe62 100644 --- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c +++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c @@ -675,7 +675,6 @@ static int sun8i_hdmi_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *node = dev->of_node; struct sun8i_hdmi_phy *phy; - struct resource res; void __iomem *regs; int ret; @@ -686,13 +685,7 @@ static int sun8i_hdmi_phy_probe(struct platform_device *pdev) phy->variant = of_device_get_match_data(dev); phy->dev = dev; - ret = of_address_to_resource(node, 0, &res); - if (ret) { - dev_err(dev, "phy: Couldn't get our resources\n"); - return ret; - } - - regs = devm_ioremap_resource(dev, &res); + regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) { dev_err(dev, "Couldn't map the HDMI PHY registers\n"); return PTR_ERR(regs); -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel