From patchwork Sat Mar 8 12:21:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 14007494 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 8EF2CC28B25 for ; Sat, 8 Mar 2025 12:33:10 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kHvAWAwLcA3aBbyaTyCBYGH3TmJcJo+BwLMUF8ZvSpY=; b=sFjrcLtUTdQfnM ZOzcsO0EFm2VTZJdQOMSHg7mmXh3oh8P1MZxd/hGMFJ/GRJYts+g0x5wrcyYB5mcptOi0ppTzJlmV Vq7qCAekLFCjg+dNEd/vw92SmpGMPYNNNOcXRZSQP6L+lPAB7AVYKBoDUchjw3v2rm/eiH4WdkbzX BQaDMOSyOYFlYWf3t2/Ecj8PiFdNMwZXSuBQfF/OVTiyRmxsDN7Q0WKuOowV05TXVcMLXflEEYFwv sLmad2CUKnRCEi9f5KQUjjUfPlhnSyXcPavRZcy7H0uh+Em8PGYcWfQVpMOyuMuD2u595Qep+V/Cr nC4RxlIN4QsrJUYHrTAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tqtMc-0000000Gb4t-0u1c; Sat, 08 Mar 2025 12:33:10 +0000 Received: from bali.collaboradmins.com ([2a01:4f8:201:9162::2]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tqtBS-0000000GZdG-3RNA; Sat, 08 Mar 2025 12:21:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1741436497; bh=MrgqgIZ157jsElaeg3dFAoESeyFXV9vNfZmK9cHxL2A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KBsxvZxe5BZH0eOrUVtnXUOm9hvk2iQlYpBkJSsUFj0TJYgBQJulDBC7WyX3giykq X72v8nWZRzYdLgaDQ8ZSzOeExhtGfXA+BzZmTDFl/t0epsrR1QxvySR3KeiyVRzook BiwqGzzDpqUGs+Eyn47JjMUMlCsWktH8HzmZ1Pqyaz5F7cm+Wvt7dCtqHofvE9sMgp hRQfLgdlSGzr8EI81Dvu4mtRKtNZIaivo+nlXibOzZpsIH4VgTsHFSqZsFkCjp/+FI 3zmzohvHKJZrMCs7zHXkH7ZngHlLnhxj/F9s8biMT1FP6bhKjPzSieSanhTH4a9eJr 1doPs+c5MBn/Q== Received: from localhost (unknown [84.232.140.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with UTF8SMTPSA id 128CE17E0657; Sat, 8 Mar 2025 13:21:37 +0100 (CET) From: Cristian Ciocaltea Date: Sat, 08 Mar 2025 14:21:15 +0200 Subject: [PATCH v5 06/12] phy: rockchip: samsung-hdptx: Drop superfluous cfgs driver data MIME-Version: 1.0 Message-Id: <20250308-phy-sam-hdptx-bpc-v5-6-35087287f9d1@collabora.com> References: <20250308-phy-sam-hdptx-bpc-v5-0-35087287f9d1@collabora.com> In-Reply-To: <20250308-phy-sam-hdptx-bpc-v5-0-35087287f9d1@collabora.com> To: Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner Cc: Algea Cao , Sandor Yu , Dmitry Baryshkov , Maxime Ripard , kernel@collabora.com, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250308_042139_039026_D6DEDAC4 X-CRM114-Status: GOOD ( 13.52 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The ->cfgs member has been introduced via commit f08d1c085638 ("phy: phy-rockchip-samsung-hdptx: Don't use dt aliases to determine phy-id"), but it is only used during probe() in order to setup ->phy_id. Use a probe() local variable to store device match data and remove the now unnecessary member from struct rk_hdptx_phy. Signed-off-by: Cristian Ciocaltea Reviewed-by: Dmitry Baryshkov --- drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c index 06644c3d98d3f8b697fc704704df5acdd3c85bad..2bf525514c1991a1299265d12e1e85f66333c604 100644 --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c @@ -392,10 +392,7 @@ struct rk_hdptx_phy { struct regmap *regmap; struct regmap *grf; - /* PHY const config */ - const struct rk_hdptx_phy_cfg *cfgs; int phy_id; - struct phy *phy; struct clk_bulk_data *clks; int nr_clks; @@ -1892,6 +1889,7 @@ static int rk_hdptx_phy_runtime_resume(struct device *dev) static int rk_hdptx_phy_probe(struct platform_device *pdev) { + const struct rk_hdptx_phy_cfg *cfgs; struct phy_provider *phy_provider; struct device *dev = &pdev->dev; struct rk_hdptx_phy *hdptx; @@ -1910,14 +1908,14 @@ static int rk_hdptx_phy_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(regs), "Failed to ioremap resource\n"); - hdptx->cfgs = device_get_match_data(dev); - if (!hdptx->cfgs) + cfgs = device_get_match_data(dev); + if (!cfgs) return dev_err_probe(dev, -EINVAL, "missing match data\n"); /* find the phy-id from the io address */ hdptx->phy_id = -ENODEV; - for (id = 0; id < hdptx->cfgs->num_phys; id++) { - if (res->start == hdptx->cfgs->phy_ids[id]) { + for (id = 0; id < cfgs->num_phys; id++) { + if (res->start == cfgs->phy_ids[id]) { hdptx->phy_id = id; break; }