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(-) 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 From e332e5a0cd73199965b31198ae978e5a4d4eea08 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sun, 19 Nov 2006 12:11:39 -0800 Subject: Use linux/autoconf.h instead of linux/config.h From: Trent Piepho linux/config.h has been deprecated for some time and is now gone. Switch to using linux/autoconf.h, which is where the config defines have been since at least 2.4 anyway. Signed-off-by: Trent Piepho --- v4l/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v4l/Makefile b/v4l/Makefile index ef5b583c0..5d77977cc 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -237,7 +237,7 @@ config-compat.h:: .myconfig @perl \ -e 'print "#ifndef __CONFIG_COMPAT_H__\n";' \ -e 'print "#define __CONFIG_COMPAT_H__\n\n";' \ - -e 'print "#include \n\n";' \ + -e 'print "#include \n\n";' \ -e 'while(<>) {' \ -e ' next unless /^(\S+)\s*:= (\S+)$$/;' \ -e ' print "#undef $$1\n";' \ -- cgit v1.2.3