From 17490135b2a7a46fc7fb67d64dbaeb1301ea169d Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 6 Nov 2008 23:02:07 +0100 Subject: v4l: fix dev_set_name compiler errors for kernels < 2.6.26 From: Hans Verkuil Priority: normal Signed-off-by: Hans Verkuil --- v4l/compat.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'v4l') diff --git a/v4l/compat.h b/v4l/compat.h index 7325e15c4..3c0c2e345 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -18,6 +18,7 @@ #ifdef CONFIG_PROC_FS #include #include +#include #endif #endif @@ -210,6 +211,10 @@ static inline struct proc_dir_entry *proc_create_data(const char *a, #define hweight64(x) generic_hweight64(x) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) +typedef unsigned long uintptr_t; +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) #define div64_u64(a,b) div64_64(a,b) @@ -219,20 +224,17 @@ static inline struct proc_dir_entry *proc_create_data(const char *a, ( h ), \ ( x ) ) ) -#define dev_name(dev) ((dev)->bus_id) - -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) -typedef unsigned long uintptr_t; -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static inline int list_is_singular(const struct list_head *head) { return !list_empty(head) && (head->next == head->prev); } +#define dev_name(dev) ((dev)->bus_id) + +#define dev_set_name(dev, fmt, arg...) ({ \ + snprintf((dev)->bus_id, sizeof((dev)->bus_id), fmt , ## arg); \ + 0; \ +}) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) -- cgit v1.2.3 From c32fc5d38296d9cf27addd94683730e1bc87d76f Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 11 Nov 2008 08:13:10 +0100 Subject: v4l: prevent building dsbr100 for older kernels From: Hans Verkuil dsbr100 uses supports_autosuspend, which is not available in kernels <2.6.19. Priority: normal Signed-off-by: Hans Verkuil --- v4l/versions.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 2b3ec7638..576af0ecd 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -45,6 +45,7 @@ USB_S2255 VIDEO_USBVISION # Uses supports_autosuspend USB_MR800 +USB_DSBR # Uses remap_vmalloc_range() [2.6.18] -- cgit v1.2.3 From 44fb259c62c95f15516f65a961483476ad226ff6 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 11 Nov 2008 07:39:53 -0200 Subject: Backport a few minor changes from upstream From: Mauro Carvalho Chehab kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'v4l') diff --git a/v4l/compat.h b/v4l/compat.h index 3c0c2e345..57b1aba8d 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -252,6 +252,10 @@ static inline int list_is_singular(const struct list_head *head) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) #define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) + +#define pci_ioremap_bar(pci, a) \ + ioremap_nocache(pci_resource_start(pci, a), \ + pci_resource_len(pci, a)) #endif #ifndef PCI_DEVICE_ID_MARVELL_88ALP01_CCIC -- cgit v1.2.3