From 60d3ac5e127d2852227812cb1c2add9316365f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20G=C5=82=C4=85bek?= Date: Mon, 19 May 2025 10:45:23 +0200 Subject: [PATCH] include: drivers: nrf_clock_control: Fix inclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a follow-up to commit 7a2ce2882a66f44dae9d462bb9ad965958369a28. Inclusion of 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 gets included and this is not necessarily always happening earlier. Instead of adding inclusion of here, move inclusion of under `#if defined(CONFIG_CLOCK_CONTROL_NRF)` where it is actually needed. Signed-off-by: Andrzej Głąbek --- include/zephyr/drivers/clock_control/nrf_clock_control.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/zephyr/drivers/clock_control/nrf_clock_control.h b/include/zephyr/drivers/clock_control/nrf_clock_control.h index d12dca3c074..a8749bfd70f 100644 --- a/include/zephyr/drivers/clock_control/nrf_clock_control.h +++ b/include/zephyr/drivers/clock_control/nrf_clock_control.h @@ -8,9 +8,6 @@ #define ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_NRF_CLOCK_CONTROL_H_ #include -#ifdef NRF_CLOCK -#include -#endif #include #include @@ -20,6 +17,8 @@ extern "C" { #if defined(CONFIG_CLOCK_CONTROL_NRF) +#include + /** @brief Clocks handled by the CLOCK peripheral. * * Enum shall be used as a sys argument in clock_control API.