Skip to contentSkip to conversation

mod_devicetable.h needs #ifdef __KERNEL__ removed

PATCH New Dan Streetman 1 participant 1 message Sep 10, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mod_devicetable.h needs #ifdef __KERNEL__ removed

In include/linux/mod_devicetable.h, there is a typedef for kernel_ulong_t that is protected inside a #ifdef __KERNEL__ block. However later in the file kernel_ulong_t is used inside structures, not protected by a #ifdef __KERNEL__. So the header file isn't includable by user-space programs. The #ifdef should be removed, here is a patch that removes it.

include/linux/mod_devicetable.h +0 -2
@@ -7,10 +7,8 @@
 #ifndef LINUX_MOD_DEVICETABLE_H
 #define LINUX_MOD_DEVICETABLE_H
 
-#ifdef __KERNEL__
 #include <linux/types.h>
 typedef unsigned long kernel_ulong_t;
-#endif
 
 #define PCI_ANY_ID (~0)