All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: pcs: xpcs: Use devm_clk_get_optional
@ 2025-07-15  2:19 Jack Ping CHNG
  2025-07-15 16:15 ` Andrew Lunn
  2025-07-17 10:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jack Ping CHNG @ 2025-07-15  2:19 UTC (permalink / raw)
  To: netdev; +Cc: davem, fancer.lancer, yzhu, sureshnagaraj, Jack Ping CHNG

Synopsys DesignWare XPCS CSR clock is optional,
so it is better to use devm_clk_get_optional
instead of devm_clk_get.

Signed-off-by: Jack Ping CHNG <jchng@maxlinear.com>
---
v2:
  - indicate net-next in the subject line
v1: https://lore.kernel.org/netdev/20250714022348.2147396-1-jchng@maxlinear.com/
---
 drivers/net/pcs/pcs-xpcs-plat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/pcs/pcs-xpcs-plat.c b/drivers/net/pcs/pcs-xpcs-plat.c
index 629315f1e57c..137d91038fb4 100644
--- a/drivers/net/pcs/pcs-xpcs-plat.c
+++ b/drivers/net/pcs/pcs-xpcs-plat.c
@@ -280,7 +280,7 @@ static int xpcs_plat_init_clk(struct dw_xpcs_plat *pxpcs)
 	struct device *dev = &pxpcs->pdev->dev;
 	int ret;
 
-	pxpcs->cclk = devm_clk_get(dev, "csr");
+	pxpcs->cclk = devm_clk_get_optional(dev, "csr");
 	if (IS_ERR(pxpcs->cclk))
 		return dev_err_probe(dev, PTR_ERR(pxpcs->cclk),
 				     "Failed to get CSR clock\n");
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-17 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15  2:19 [PATCH net-next v2] net: pcs: xpcs: Use devm_clk_get_optional Jack Ping CHNG
2025-07-15 16:15 ` Andrew Lunn
2025-07-17 10:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.