summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-08-17 03:08:46 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-08-17 03:08:46 -0300
commit45a54903feaab08ae3980a1aa4ce8635480d105b (patch)
tree3366df442c5ecbd93e9102fb42b06391833d1d6c /v4l
parentfac62b36a8544d767f1454b136254c114ab6ae9d (diff)
downloadmediapointer-dvb-s2-45a54903feaab08ae3980a1aa4ce8635480d105b.tar.gz
mediapointer-dvb-s2-45a54903feaab08ae3980a1aa4ce8635480d105b.tar.bz2
Make dvbdev compatible again with older kernel versions
From: Mauro Carvalho Chehab <mchehab@infradead.org> class_device_create/class_device_destroy are being replaced by device_create/device_destroy. This patch make it backward compatible. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l')
-rw-r--r--v4l/compat.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index 584d96035..1162dadac 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -282,10 +282,11 @@ static inline int vm_insert_page(struct vm_area_struct *vma,
# define class_device_destroy(a, b) class_simple_device_remove(b)
# define class_create(a, b) class_simple_create(a, b)
# define class_destroy(a) class_simple_destroy(a)
-#else
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
# define class_device_create(a, b, c, d, e, f, g, h) class_device_create(a, c, d, e, f, g, h)
-#endif
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+# define device_create(a, b, c, d, e, f, g) class_device_create(a, NULL, c, b, d, e, f, g)
+# define device_destroy(a, b) class_device_destroy(a, b)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)