Skip to content

Commit 22ebd56

Browse files
bbilasfabiobaltieri
authored andcommitted
drivers: ethernet: esp32: guard eth_esp32_iomux_rmii_clk_input
Add a guard for `eth_esp32_iomux_rmii_clk_input` function to fix the following error: error: 'eth_esp32_iomux_rmii_clk_input' defined but not used [-Werror=unused-function] 245 | static void eth_esp32_iomux_rmii_clk_input(void) Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
1 parent f89c37d commit 22ebd56

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/ethernet/eth_esp32.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ static uint32_t eth_esp32_receive_frame(struct eth_esp32_dev_data *dev_data, uin
242242
return copy_len;
243243
}
244244

245+
#if !DT_INST_NODE_HAS_PROP(0, ref_clk_output_gpios)
245246
static void eth_esp32_iomux_rmii_clk_input(void)
246247
{
247248
const emac_iomux_info_t *pin = emac_rmii_iomux_pins.clki;
@@ -252,6 +253,7 @@ static void eth_esp32_iomux_rmii_clk_input(void)
252253
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[pin->gpio_num], pin->func);
253254
}
254255
}
256+
#endif
255257

256258
static void eth_esp32_iomux_init_mii(void)
257259
{

0 commit comments

Comments
 (0)