Skip to content

Commit 60d3ac5

Browse files
ananglkartben
authored andcommitted
include: drivers: nrf_clock_control: Fix <hal/nrf_clock.h> inclusion
This is a follow-up to commit 7a2ce28. Inclusion of <hal/nrf_clock.h> should not be done based on the NRF_CLOCK symbol being defined, because it depends on the order in which headers are included - that symbol gets defined when <nrfx.h> gets included and this is not necessarily always happening earlier. Instead of adding inclusion of <nrfx.h> here, move inclusion of <hal/nrf_clock.h> under `#if defined(CONFIG_CLOCK_CONTROL_NRF)` where it is actually needed. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
1 parent c458d92 commit 60d3ac5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

include/zephyr/drivers/clock_control/nrf_clock_control.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#define ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_NRF_CLOCK_CONTROL_H_
99

1010
#include <zephyr/device.h>
11-
#ifdef NRF_CLOCK
12-
#include <hal/nrf_clock.h>
13-
#endif
1411
#include <zephyr/sys/onoff.h>
1512
#include <zephyr/drivers/clock_control.h>
1613

@@ -20,6 +17,8 @@ extern "C" {
2017

2118
#if defined(CONFIG_CLOCK_CONTROL_NRF)
2219

20+
#include <hal/nrf_clock.h>
21+
2322
/** @brief Clocks handled by the CLOCK peripheral.
2423
*
2524
* Enum shall be used as a sys argument in clock_control API.

0 commit comments

Comments
 (0)