diff --git a/boards/arm/at32/at32f437-mini/src/at32_ethernet.c b/boards/arm/at32/at32f437-mini/src/at32_ethernet.c index 2821c61a4c..390598ceb9 100644 --- a/boards/arm/at32/at32f437-mini/src/at32_ethernet.c +++ b/boards/arm/at32/at32f437-mini/src/at32_ethernet.c @@ -81,9 +81,8 @@ * Private Data ****************************************************************************/ -static spinlock_t g_ethmac_lock = SP_UNLOCKED; - #ifdef HAVE_NETMONITOR +static spinlock_t g_ethmac_lock = SP_UNLOCKED; static xcpt_t g_ethmac_handler; static void *g_ethmac_arg; #endif diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_ethernet.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_ethernet.c index 9bdd3f07f6..185130095e 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_ethernet.c +++ b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_ethernet.c @@ -76,7 +76,9 @@ * Private Data ****************************************************************************/ +#ifdef GPIO_ENET_IRQ static spinlock_t g_phy_lock = SP_UNLOCKED; +#endif /**************************************************************************** * Private Functions diff --git a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_ethernet.c b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_ethernet.c index fea90e458b..30e499cf65 100644 --- a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_ethernet.c +++ b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_ethernet.c @@ -79,7 +79,9 @@ * Private Data ****************************************************************************/ +#ifdef CONFIG_IMXRT_GPIO1_0_15_IRQ static spinlock_t g_phy_lock = SP_UNLOCKED; +#endif /**************************************************************************** * Private Functions diff --git a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_ethernet.c b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_ethernet.c index 18c6cf7885..dc643e48dc 100644 --- a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_ethernet.c +++ b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_ethernet.c @@ -77,7 +77,9 @@ * Private Data ****************************************************************************/ +#ifdef CONFIG_IMXRT_GPIO1_0_15_IRQ static spinlock_t g_phy_lock = SP_UNLOCKED; +#endif /**************************************************************************** * Private Functions diff --git a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_ethernet.c b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_ethernet.c index 0dcfc4da65..00d7ad09bb 100644 --- a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_ethernet.c +++ b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_ethernet.c @@ -77,7 +77,9 @@ * Private Data ****************************************************************************/ +#ifdef CONFIG_IMXRT_GPIO1_0_15_IRQ static spinlock_t g_phy_lock = SP_UNLOCKED; +#endif /**************************************************************************** * Private Functions diff --git a/boards/arm/imxrt/teensy-4.x/src/imxrt_ethernet.c b/boards/arm/imxrt/teensy-4.x/src/imxrt_ethernet.c index 6053bcaec9..d32c21fef9 100644 --- a/boards/arm/imxrt/teensy-4.x/src/imxrt_ethernet.c +++ b/boards/arm/imxrt/teensy-4.x/src/imxrt_ethernet.c @@ -77,7 +77,9 @@ * Private Data ****************************************************************************/ +#ifdef CONFIG_IMXRT_GPIO1_0_15_IRQ static spinlock_t g_phy_lock = SP_UNLOCKED; +#endif /**************************************************************************** * Private Functions diff --git a/boards/arm/sama5/sama5d2-xult/src/sam_ethernet.c b/boards/arm/sama5/sama5d2-xult/src/sam_ethernet.c index f6424c3ba1..e7ebf6e943 100644 --- a/boards/arm/sama5/sama5d2-xult/src/sam_ethernet.c +++ b/boards/arm/sama5/sama5d2-xult/src/sam_ethernet.c @@ -86,7 +86,9 @@ * Private Data ****************************************************************************/ +#ifdef CONFIG_SAMA5_PIOE_IRQ static spinlock_t g_phy_lock = SP_UNLOCKED; +#endif /**************************************************************************** * Private Functions diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_ethernet.c b/boards/arm/sama5/sama5d3x-ek/src/sam_ethernet.c index e3d32befad..33df048ea7 100644 --- a/boards/arm/sama5/sama5d3x-ek/src/sam_ethernet.c +++ b/boards/arm/sama5/sama5d3x-ek/src/sam_ethernet.c @@ -86,7 +86,9 @@ * Private Data ****************************************************************************/ +#ifdef CONFIG_SAMA5_PIOE_IRQ static spinlock_t g_phy_lock = SP_UNLOCKED; +#endif /**************************************************************************** * Private Functions diff --git a/boards/arm/samv7/same70-xplained/src/sam_ethernet.c b/boards/arm/samv7/same70-xplained/src/sam_ethernet.c index d100c42689..8f91e63110 100644 --- a/boards/arm/samv7/same70-xplained/src/sam_ethernet.c +++ b/boards/arm/samv7/same70-xplained/src/sam_ethernet.c @@ -82,7 +82,9 @@ * Private Data ****************************************************************************/ +#ifdef CONFIG_SAMV7_GPIOA_IRQ static spinlock_t g_phy_lock = SP_UNLOCKED; +#endif /**************************************************************************** * Private Functions diff --git a/boards/arm/samv7/samv71-xult/src/sam_ethernet.c b/boards/arm/samv7/samv71-xult/src/sam_ethernet.c index 7bcdb6be69..2bc8cbd708 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_ethernet.c +++ b/boards/arm/samv7/samv71-xult/src/sam_ethernet.c @@ -82,7 +82,9 @@ * Private Data ****************************************************************************/ +#ifdef CONFIG_SAMV7_GPIOA_IRQ static spinlock_t g_phy_lock = SP_UNLOCKED; +#endif /**************************************************************************** * Private Functions diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ethernet.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ethernet.c index 45e722039f..9a39e6ef61 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_ethernet.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_ethernet.c @@ -81,9 +81,8 @@ * Private Data ****************************************************************************/ -static spinlock_t g_phy_lock = SP_UNLOCKED; - #ifdef HAVE_NETMONITOR +static spinlock_t g_phy_lock = SP_UNLOCKED; static xcpt_t g_ethmac_handler; static void *g_ethmac_arg; #endif