]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: dwc_eth_qos: fix build break when CLK not enabled
authorPeng Fan <peng.fan@nxp.com>
Tue, 26 Jul 2022 08:41:13 +0000 (16:41 +0800)
committerStefano Babic <sbabic@denx.de>
Tue, 26 Jul 2022 09:29:01 +0000 (11:29 +0200)
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

index 9d255cf95ff647e4c9faecc0d3fc84fb376da7f3..6048d56ff8cdc400923daae1f689327de5c64310 100644 (file)
@@ -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);