From 00fcfa81cbf7da5397bb745f934400f3192804d7 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 26 Jul 2022 16:41:13 +0800 Subject: [PATCH] net: dwc_eth_qos: fix build break when CLK not enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- drivers/net/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 9d255cf95f..6048d56ff8 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); -- 2.39.5