Skip to contentSkip to conversation

fbdev: include backlight.h only when __KERNEL__ is defined

PATCH New Michal Januszewski 1 participant 1 message Aug 8, 2006 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fbdev: include backlight.h only when __KERNEL__ is defined

linux/backlight.h pulls in header files (eg. ioport.h) that break compilation of userspace programs. To solve the problem, only include backlight.h in fb.h if compiling kernel stuff.

---

include/linux/fb.h +1 -1
index 4ad0673..2f335e9 100644
@@ -1,7 +1,6 @@
 #ifndef _LINUX_FB_H
 #define _LINUX_FB_H
 
-#include <linux/backlight.h>
 #include <asm/types.h>
 
 /* Definitions of frame buffers						*/
@@ -381,6 +380,7 @@ #include <linux/device.h>
 #include <linux/workqueue.h>
 #include <linux/notifier.h>
 #include <linux/list.h>
+#include <linux/backlight.h>
 #include <asm/io.h>
 
 struct vm_area_struct;