From 4069ba86398882e0670b383ee0622f82e3ffe5a7 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sun, 19 Nov 2006 12:11:32 -0800 Subject: compat: Use kernel version to control PCIAGP_FAIL compat code From: Trent Piepho PCIAGP_FAIL is a new pci quirk added in 2.6.19. The code in compat.h was checking if PCIAGP_FAIL was already defined to determine whether or not to include the backward compatibility code. This didn't work in a number of cases when compat.h was included before linux/pci.h, as PCIAGP_FAIL would get defined by compat.h and then re-defined by linux/pci.h. Signed-off-by: Trent Piepho --- v4l/compat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'v4l') diff --git a/v4l/compat.h b/v4l/compat.h index b245c95e2..19d648d5e 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -311,8 +311,8 @@ usb_to_input_id(const struct usb_device *dev, struct input_id *id) } #endif -#ifndef PCIAGP_FAIL - #define PCIAGP_FAIL 0 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) +# define PCIAGP_FAIL 0 #endif #ifndef true -- cgit v1.2.3