diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-20 12:57:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-20 12:57:39 -0300 |
commit | 2e9f5b4d99ccd25631f71d034960abb4c024d5a5 (patch) | |
tree | f9ae389af1c7290206521381d4d190232bb9a779 /v4l | |
parent | ba6335c0bee940630c05f4e22276b03ed7217b33 (diff) | |
parent | d4d6f90d82150e74c1d11b906aa3a9c2239ee660 (diff) | |
download | mediapointer-dvb-s2-2e9f5b4d99ccd25631f71d034960abb4c024d5a5.tar.gz mediapointer-dvb-s2-2e9f5b4d99ccd25631f71d034960abb4c024d5a5.tar.bz2 |
merge: http://linuxtv.org/hg/~hverkuil/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/compat.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index ed6605687..584d96035 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -5,7 +5,7 @@ #ifndef _COMPAT_H #define _COMPAT_H -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) # define set_freezable() #endif @@ -389,6 +389,15 @@ typedef int bool; #define pci_match_device(drv, dev) pci_match_device((drv)->id_table, dev) #endif +/* pci_dev got a new revision field in 2.6.23-rc1 */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) && defined(LINUX_PCI_H) +/* Just make it easier to subsitute pci_dev->revision with + * v4l_compat_pci_rev(pci_dev). It's too bad there isn't some kind of context + * sensitive macro in C that could do this for us. */ +static inline u8 v4l_compat_pci_rev(struct pci_dev *pci) +{ u8 rev; pci_read_config_byte(pci, PCI_REVISION_ID, &rev); return rev; } +#endif + #endif /* * Local variables: |