summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-06 17:16:46 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-06 17:16:46 -0200
commit8d929dd40fc6ccd651aea85683f84d2c32600da9 (patch)
tree80fee04c06a7e2d9f06e5b1392cf62bd20a97612 /v4l
parentf7e781d3bbc0d084f09a60526ef7f3d705572dec (diff)
downloadmediapointer-dvb-s2-8d929dd40fc6ccd651aea85683f84d2c32600da9.tar.gz
mediapointer-dvb-s2-8d929dd40fc6ccd651aea85683f84d2c32600da9.tar.bz2
Fix compilation with kernel 2.6.24-rc1
From: Mauro Carvalho Chehab <mchehab@infradead.org> - kbuild change: CPPFLAGS should be replaced by KBUILD_CPPFLAGS; - I2C_PEC is now defined at i2c-dev.h; - task_pid_nr compat code is wrong. Thanks to Maxim Levinsky for pointing me those issues Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l')
-rw-r--r--v4l/Makefile4
-rw-r--r--v4l/compat.h9
2 files changed, 10 insertions, 3 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index 2080aa29e..75e9c50ef 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -157,6 +157,10 @@ CC += -I$(obj)
ifeq ($(VERSION).$(PATCHLEVEL),2.6)
CPPFLAGS := -I$(SUBDIRS)/../linux/include $(CPPFLAGS) -I$(SUBDIRS)/
+
+ # Needed for kernel 2.6.24 or upper
+ KBUILD_CPPFLAGS := -I$(SUBDIRS)/../linux/include $(KBUILD_CPPFLAGS) -I$(SUBDIRS)/
+
MYCFLAGS :=
else
MYCFLAGS := CFLAGS="-I../linux/include -D__KERNEL__ -I$(KDIR)/include -DEXPORT_SYMTAB"
diff --git a/v4l/compat.h b/v4l/compat.h
index ec43d8630..8df5afe2c 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -9,6 +9,11 @@
#define KERN_CONT ""
#endif
+/* To allow I2C compatibility code to work */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
+#include <linux/i2c-dev.h>
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
# define set_freezable()
#endif
@@ -466,11 +471,9 @@ static inline unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate)
}
#endif
-#ifndef task_pid_nr
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
# define task_pid_nr(current) ((current)->pid)
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
# define sg_init_table(a,b)
# define sg_page(p) (sg->page)
# define sg_set_page(sglist,pg,sz,off) \