Subject: dahdi: Do not use <stdbool.h> in kernel modules
From: Ben Hutchings <[email-masked]>
Date: Sat, 12 Feb 2022 19:32:52 +0100

There was an intentional change in Linux 5.16 removing user-space
headers from the kernel include path:
<https://git.kernel.org/linus/04e85bbf71c9072dcf0ad9a7150495d72461105c>.

Kernel code must use <linux/types.h> instead of <stdbool.h>.

---
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -86,7 +86,7 @@
 
 #include "hpec/hpec_user.h"
 
-#include <stdbool.h>
+#include <linux/types.h>
 
 #if defined(EMPULSE) && defined(EMFLASH)
 #error "You cannot define both EMPULSE and EMFLASH"
--- a/drivers/dahdi/wcaxx-base.c
+++ b/drivers/dahdi/wcaxx-base.c
@@ -34,7 +34,7 @@
 #include <linux/firmware.h>
 #include <linux/crc32.h>
 
-#include <stdbool.h>
+#include <linux/types.h>

 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
--- a/drivers/dahdi/wct4xxp/base.c
+++ b/drivers/dahdi/wct4xxp/base.c
@@ -42,7 +42,7 @@
 #include <linux/crc32.h>
 #include <linux/slab.h>
 
-#include <stdbool.h>
+#include <linux/types.h>
 #include <dahdi/kernel.h>
 
 #include "wct4xxp.h"
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -39,7 +39,7 @@
 #include <linux/etherdevice.h>
 #include <linux/timer.h>
 
-#include <stdbool.h>
+#include <linux/types.h>
 
 #include <dahdi/kernel.h>
 
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -58,7 +58,7 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00
 #include <linux/crc32.h>
 #include <linux/slab.h>
 
-#include <stdbool.h>
+#include <linux/types.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
 /* Define this if you would like to load the modules in parallel.  While this
--- a/drivers/dahdi/wcte13xp-base.c
+++ b/drivers/dahdi/wcte13xp-base.c
@@ -43,7 +43,7 @@
 
 #include <linux/slab.h>
 
-#include <stdbool.h>
+#include <linux/types.h>
 #include <dahdi/kernel.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
--- a/drivers/dahdi/wcte13xp-base.c
+++ b/drivers/dahdi/wcte13xp-base.c
@@ -35,7 +35,7 @@
 #include <linux/sched.h>
 #include <linux/crc32.h>
 
-#include <stdbool.h>
+#include <linux/types.h>
 #include <dahdi/kernel.h>
 
 #include "wct4xxp/wct4xxp.h"	/* For certain definitions */
--- a/drivers/dahdi/wcte43x-base.c
+++ b/drivers/dahdi/wcte43x-base.c
@@ -43,7 +43,7 @@
 #include <linux/firmware.h>
 #include <oct612x.h>
 
-#include <stdbool.h>
+#include <linux/types.h>
 #include <dahdi/kernel.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
--- a/drivers/dahdi/wcxb.c
+++ b/drivers/dahdi/wcxb.c
@@ -38,7 +38,7 @@
 
 #include <dahdi/kernel.h>
 
-#include <stdbool.h>
+#include <linux/types.h>
 
 #include "wcxb.h"
 #include "wcxb_spi.h"
--- a/drivers/dahdi/wct4xxp/vpm450m.c
+++ b/drivers/dahdi/wct4xxp/vpm450m.c
@@ -28,7 +28,7 @@
 #include <linux/version.h>
 
 #include <dahdi/kernel.h>
-#include <stdbool.h>
+#include <linux/types.h>
 
 #include "vpm450m.h"
 #include <oct612x.h>
--- a/drivers/dahdi/voicebus/vpmoct.h
+++ b/drivers/dahdi/voicebus/vpmoct.h
@@ -30,7 +30,7 @@
 #include <linux/timer.h>
 #include "dahdi/kernel.h"
 
-#include <stdbool.h>
+#include <linux/kernel.h>
 
 #define VPMOCT_FIRM_HEADER_LEN 32
 #define VPMOCT_BOOT_RAM_LEN 128
--- a/drivers/dahdi/wcxb_spi.h
+++ b/drivers/dahdi/wcxb_spi.h
@@ -24,7 +24,7 @@
 #define __WCXB_SPI_H
 
 #include <linux/spi/spi.h>
-#include <stdbool.h>
+#include <linux/types.h>
 
 struct wcxb_spi_transfer {
 	const void	*tx_buf;