Skip to content

Commit dfd1b3d

Browse files
committed
[nrf fromlist] 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. Upstream PR #: 82995 Signed-off-by: Piotr Pryga <[email protected]>
1 parent b9a8a7a commit dfd1b3d

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

drivers/clock_control/clock_control_nrf2_hfxo.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,15 @@ static uint32_t full_irq_lock(void)
3737
{
3838
uint32_t mcu_critical_state;
3939

40-
if (IS_ENABLED(CONFIG_ZERO_LATENCY_IRQS)) {
41-
mcu_critical_state = __get_PRIMASK();
42-
__disable_irq();
43-
} else {
44-
mcu_critical_state = irq_lock();
45-
}
40+
mcu_critical_state = __get_PRIMASK();
41+
__disable_irq();
4642

4743
return mcu_critical_state;
4844
}
4945

5046
static void full_irq_unlock(uint32_t mcu_critical_state)
5147
{
52-
if (IS_ENABLED(CONFIG_ZERO_LATENCY_IRQS)) {
53-
__set_PRIMASK(mcu_critical_state);
54-
} else {
55-
irq_unlock(mcu_critical_state);
56-
}
48+
__set_PRIMASK(mcu_critical_state);
5749
}
5850
#endif /* CONFIG_ZERO_LATENCY_IRQS */
5951

0 commit comments

Comments
 (0)