[PATCH v1] gpio: mcp230xx: add missing header for udelay()

bigunclemax at gmail.com bigunclemax at gmail.com
Thu Sep 19 16:38:37 CEST 2024


From: Maksim Kiselev <bigunclemax at gmail.com>

Since GCC 14 -Werror=implicit-function-declaration is enabled by default.
This leads to following compilation error:

  drivers/gpio/mcp230xx_gpio.c:57:9: error:
    implicit declaration of function ‘udelay’
    [-Wimplicit-function-declaration]
      57 |         udelay(1);

Add missing header to fix this error.

Signed-off-by: Maksim Kiselev <bigunclemax at gmail.com>
---
 drivers/gpio/mcp230xx_gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/mcp230xx_gpio.c b/drivers/gpio/mcp230xx_gpio.c
index 42e7fe9d47..b6f533b130 100644
--- a/drivers/gpio/mcp230xx_gpio.c
+++ b/drivers/gpio/mcp230xx_gpio.c
@@ -14,6 +14,7 @@
 #include <asm/gpio.h>
 #include <dm/device_compat.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <linux/delay.h>
 
 enum mcp230xx_type {
 	UNKNOWN = 0,
-- 
2.45.2



More information about the U-Boot mailing list