diff mbox series

[V2,43/53] net: dwc_eth_qos: fix build break when CLK not enabled

Message ID 20220726084123.2508-44-peng.fan@oss.nxp.com
State Accepted
Commit 00fcfa81cbf7da5397bb745f934400f3192804d7
Delegated to: Stefano Babic
Headers show
Series NXP-IMX pending patches | expand

Commit Message

Peng Fan (OSS) July 26, 2022, 8:41 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

When CONFIG_CLK is not enabled, there will be buil break:
"error: ‘eqos’ undeclared (first use in this function)"

Take eqos definition out the CONFIG_CLK ifdef.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/net/dwc_eth_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic July 26, 2022, 1:52 p.m. UTC | #1
> From: Peng Fan <peng.fan@nxp.com>
> When CONFIG_CLK is not enabled, there will be buil break:
> "error: ‘eqos’ undeclared (first use in this function)"
> Take eqos definition out the CONFIG_CLK ifdef.
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 9d255cf95ff..6048d56ff8c 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -1774,11 +1774,11 @@  static int eqos_remove_resources_tegra186(struct udevice *dev)
 
 static int eqos_remove_resources_stm32(struct udevice *dev)
 {
-#ifdef CONFIG_CLK
 	struct eqos_priv *eqos = dev_get_priv(dev);
 
 	debug("%s(dev=%p):\n", __func__, dev);
 
+#ifdef CONFIG_CLK
 	clk_free(&eqos->clk_tx);
 	clk_free(&eqos->clk_rx);
 	clk_free(&eqos->clk_master_bus);