From 68a97b349e64755edc45ac762b1b4ca3eb0fbcf9 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Tue, 25 Jul 2006 09:32:49 -0300 Subject: bttv: clean up some pre-2.6.0 class device compat stuff From: Trent Piepho Add bit of compat code for class_device_create_file() to compat.h for pre-2.6.0 kernels. This allows an #ifdef to be removed from bttv-driver.c, and helps other code which never had one. Changed the code to turn on for pre-2.6.0, rather than pre-2.5.0, as the class device stuff was added in 2.5.69. Signed-off-by: Trent Piepho --- v4l/compat.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'v4l/compat.h') diff --git a/v4l/compat.h b/v4l/compat.h index 08ac828d6..9918f2e46 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -249,6 +249,11 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr) #endif #endif +/* The class_device system didn't appear until 2.5.69 */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) +#define class_device_create_file(a, b) (0) +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) # define class_device_create(a, b, c, d, e, f, g, h) class_simple_device_add(a, c, d, e, f, g, h) # define class_device_destroy(a, b) class_simple_device_remove(b) -- cgit v1.2.3