From 10a6bd02d6c41cc340e1cb8001cc43abbaf5cc0a Mon Sep 17 00:00:00 2001 From: Piotr Pryga Date: Sat, 14 Dec 2024 19:15:37 +0100 Subject: [PATCH] [nrf fromtree] drivers: clock_control: nrf: hfxo: Remove redundad code There were redundant code in full_irq_lock(), full_irq_unlock() functions that supposed to be used when ZLI IRQs are disabled. These functions are compiled in only when CONFIG_ZERO_LATENCY_IRQS is set, hence the non-ZLI execution path was never included in final binaries. Signed-off-by: Piotr Pryga (cherry picked from commit 233095c3f452c05683f0410140e737d89567d927) Signed-off-by: Piotr Pryga --- drivers/clock_control/clock_control_nrf2_hfxo.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/clock_control/clock_control_nrf2_hfxo.c b/drivers/clock_control/clock_control_nrf2_hfxo.c index 43998427f8b..eae419f18bb 100644 --- a/drivers/clock_control/clock_control_nrf2_hfxo.c +++ b/drivers/clock_control/clock_control_nrf2_hfxo.c @@ -37,23 +37,15 @@ static uint32_t full_irq_lock(void) { uint32_t mcu_critical_state; - if (IS_ENABLED(CONFIG_ZERO_LATENCY_IRQS)) { - mcu_critical_state = __get_PRIMASK(); - __disable_irq(); - } else { - mcu_critical_state = irq_lock(); - } + mcu_critical_state = __get_PRIMASK(); + __disable_irq(); return mcu_critical_state; } static void full_irq_unlock(uint32_t mcu_critical_state) { - if (IS_ENABLED(CONFIG_ZERO_LATENCY_IRQS)) { - __set_PRIMASK(mcu_critical_state); - } else { - irq_unlock(mcu_critical_state); - } + __set_PRIMASK(mcu_critical_state); } #endif /* CONFIG_ZERO_LATENCY_IRQS */