From 3864c895a86527aa8e147561fd115b4517b845e7 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Mon, 16 Dec 2024 16:12:07 +0100 Subject: [PATCH] samples: fix zephyr/drivers/gpio.h usage Only include the header if using any of the GPIO API calls/ struct/defines. Signed-off-by: Gerard Marull-Paretas --- samples/bluetooth/central_past/src/main.c | 1 - samples/bluetooth/mesh/src/main.c | 1 - samples/bluetooth/peripheral_past/src/main.c | 1 - samples/bluetooth/st_ble_sensor/src/button_svc.c | 1 + samples/boards/bbc/microbit/display/src/main.c | 1 - samples/boards/bbc/microbit/pong/src/ble.c | 1 - .../onoff_level_lighting_vnd_app/src/mesh/device_composition.c | 2 -- .../mesh/onoff_level_lighting_vnd_app/src/mesh/state_binding.c | 1 - .../mesh/onoff_level_lighting_vnd_app/src/mesh/transition.c | 2 -- samples/boards/phytec/reel_board/mesh_badge/src/periphs.c | 1 - samples/drivers/espi/src/espi_oob_handler.c | 1 - samples/drivers/i2s/i2s_codec/src/main.c | 1 - samples/drivers/ipm/ipm_esp32/src/procpu_shell.c | 1 - samples/drivers/kscan/src/main.c | 1 - samples/net/lwm2m_client/src/lwm2m-client.c | 1 - samples/sensor/grow_r502a/src/main.c | 1 - samples/subsys/modbus/rtu_client/src/main.c | 1 - samples/subsys/usb_c/sink/src/main.c | 1 - samples/subsys/usb_c/source/src/main.c | 1 - 19 files changed, 1 insertion(+), 20 deletions(-) diff --git a/samples/bluetooth/central_past/src/main.c b/samples/bluetooth/central_past/src/main.c index d79277bf6b375d0..affb0486d3fa4b9 100644 --- a/samples/bluetooth/central_past/src/main.c +++ b/samples/bluetooth/central_past/src/main.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/samples/bluetooth/mesh/src/main.c b/samples/bluetooth/mesh/src/main.c index b220b354fd5c17b..cec8159e292ac0e 100644 --- a/samples/bluetooth/mesh/src/main.c +++ b/samples/bluetooth/mesh/src/main.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/samples/bluetooth/peripheral_past/src/main.c b/samples/bluetooth/peripheral_past/src/main.c index 1bd6aa35cf7f6a5..1ad4692c9cd7f10 100644 --- a/samples/bluetooth/peripheral_past/src/main.c +++ b/samples/bluetooth/peripheral_past/src/main.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/samples/bluetooth/st_ble_sensor/src/button_svc.c b/samples/bluetooth/st_ble_sensor/src/button_svc.c index 2f1ff573f6f40f1..e212095676dc7aa 100644 --- a/samples/bluetooth/st_ble_sensor/src/button_svc.c +++ b/samples/bluetooth/st_ble_sensor/src/button_svc.c @@ -10,6 +10,7 @@ #include "button_svc.h" +#include #include #include diff --git a/samples/boards/bbc/microbit/display/src/main.c b/samples/boards/bbc/microbit/display/src/main.c index b6b00f0e7a2e901..bf7e5de0c19e042 100644 --- a/samples/boards/bbc/microbit/display/src/main.c +++ b/samples/boards/bbc/microbit/display/src/main.c @@ -6,7 +6,6 @@ #include #include -#include #include #include diff --git a/samples/boards/bbc/microbit/pong/src/ble.c b/samples/boards/bbc/microbit/pong/src/ble.c index bdbad05639af332..36d0115aa6813a5 100644 --- a/samples/boards/bbc/microbit/pong/src/ble.c +++ b/samples/boards/bbc/microbit/pong/src/ble.c @@ -6,7 +6,6 @@ #include #include -#include #include #include diff --git a/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/device_composition.c b/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/device_composition.c index 1c59ef8fbd75247..21067df99aa363e 100644 --- a/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/device_composition.c +++ b/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/device_composition.c @@ -5,8 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include - #include "ble_mesh.h" #include "common.h" #include "device_composition.h" diff --git a/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/state_binding.c b/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/state_binding.c index c923304f0dc1b35..b1d317e6460e68c 100644 --- a/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/state_binding.c +++ b/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/state_binding.c @@ -6,7 +6,6 @@ */ #include -#include #include "ble_mesh.h" #include "device_composition.h" diff --git a/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/transition.c b/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/transition.c index 262958ad1c2b194..18adb5a6773ebaf 100644 --- a/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/transition.c +++ b/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/transition.c @@ -5,8 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include - #include "ble_mesh.h" #include "common.h" #include "device_composition.h" diff --git a/samples/boards/phytec/reel_board/mesh_badge/src/periphs.c b/samples/boards/phytec/reel_board/mesh_badge/src/periphs.c index d4883397c2d285c..76ce27e3c027c5e 100644 --- a/samples/boards/phytec/reel_board/mesh_badge/src/periphs.c +++ b/samples/boards/phytec/reel_board/mesh_badge/src/periphs.c @@ -5,7 +5,6 @@ */ #include -#include #include #include "board.h" #include "mesh.h" diff --git a/samples/drivers/espi/src/espi_oob_handler.c b/samples/drivers/espi/src/espi_oob_handler.c index 59f988c7ad5197e..40c1fff74c50511 100644 --- a/samples/drivers/espi/src/espi_oob_handler.c +++ b/samples/drivers/espi/src/espi_oob_handler.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/samples/drivers/i2s/i2s_codec/src/main.c b/samples/drivers/i2s/i2s_codec/src/main.c index 734d9a9f27b7fb2..cc96ae8bc5d43d5 100644 --- a/samples/drivers/i2s/i2s_codec/src/main.c +++ b/samples/drivers/i2s/i2s_codec/src/main.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/samples/drivers/ipm/ipm_esp32/src/procpu_shell.c b/samples/drivers/ipm/ipm_esp32/src/procpu_shell.c index 56385235fda578e..e036b6608e62be9 100644 --- a/samples/drivers/ipm/ipm_esp32/src/procpu_shell.c +++ b/samples/drivers/ipm/ipm_esp32/src/procpu_shell.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/samples/drivers/kscan/src/main.c b/samples/drivers/kscan/src/main.c index 21c02a3adc81be4..66fdd5727bb6288 100644 --- a/samples/drivers/kscan/src/main.c +++ b/samples/drivers/kscan/src/main.c @@ -6,7 +6,6 @@ #include #include -#include #include #include diff --git a/samples/net/lwm2m_client/src/lwm2m-client.c b/samples/net/lwm2m_client/src/lwm2m-client.c index e59b4e9482a3d05..d1334bcac998219 100644 --- a/samples/net/lwm2m_client/src/lwm2m-client.c +++ b/samples/net/lwm2m_client/src/lwm2m-client.c @@ -13,7 +13,6 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include -#include #include #include #include diff --git a/samples/sensor/grow_r502a/src/main.c b/samples/sensor/grow_r502a/src/main.c index da8923e1fc27bc4..c8164d0684eb28a 100644 --- a/samples/sensor/grow_r502a/src/main.c +++ b/samples/sensor/grow_r502a/src/main.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include diff --git a/samples/subsys/modbus/rtu_client/src/main.c b/samples/subsys/modbus/rtu_client/src/main.c index fd3466475f349a4..668bb57e5c1ebff 100644 --- a/samples/subsys/modbus/rtu_client/src/main.c +++ b/samples/subsys/modbus/rtu_client/src/main.c @@ -6,7 +6,6 @@ #include #include -#include #include #include diff --git a/samples/subsys/usb_c/sink/src/main.c b/samples/subsys/usb_c/sink/src/main.c index fb6407a030917d5..14daabd48bd5f17 100644 --- a/samples/subsys/usb_c/sink/src/main.c +++ b/samples/subsys/usb_c/sink/src/main.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include diff --git a/samples/subsys/usb_c/source/src/main.c b/samples/subsys/usb_c/source/src/main.c index 1e7018c2748fa33..177860a4335e80f 100644 --- a/samples/subsys/usb_c/source/src/main.c +++ b/samples/subsys/usb_c/source/src/main.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include