summaryrefslogtreecommitdiff
path: root/v4l/compat.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-08 08:26:19 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-07-08 08:26:19 +0200
commitea33affdbd8d71fab71e3f62845b9239d6f60ff8 (patch)
treee0e99b43f896b3323ef7f7386e6ea4666f1b1bf7 /v4l/compat.h
parent1e35850ac2509c324478d38091880e60ab28795f (diff)
downloadmediapointer-dvb-s2-ea33affdbd8d71fab71e3f62845b9239d6f60ff8.tar.gz
mediapointer-dvb-s2-ea33affdbd8d71fab71e3f62845b9239d6f60ff8.tar.bz2
v4l-dvb: remove support for kernels < 2.6.13
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 3 of the compat cleanup. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'v4l/compat.h')
-rw-r--r--v4l/compat.h86
1 files changed, 1 insertions, 85 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index ecfb51a2f..b59d0ed04 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -31,43 +31,14 @@
#define cancel_delayed_work_sync cancel_rearming_delayed_work
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
-# define DEVICE_ATTR(a,b,c,d) CLASS_DEVICE_ATTR(a,b,c,d)
-# define device_create_file(a,b) class_device_create_file(a,b)
-# define device_remove_file(a,b) class_device_remove_file(a,b)
-# define device_register(a) class_device_register(a)
-# define device_unregister(a) class_device_unregister(a)
-#endif
-
#ifndef __pure
# define __pure __attribute__((pure))
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
-# define pm_message_t u32
-# define pci_choose_state(pci_dev, state) (state)
-# define PCI_D0 (0)
-# define assert_spin_locked(foobar)
-#endif
-
#ifndef I2C_M_IGNORE_NAK
# define I2C_M_IGNORE_NAK 0x1000
#endif
-/* v4l-dvb uses an out of kernel copy of i2c-id.h, which does not have
- some stuff that previous versions of i2c-id.h defined. */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) && defined(LINUX_I2C_ID_H)
-# define I2C_ALGO_BIT 0x010000
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
-# define KEY_SEND 231
-# define KEY_REPLY 232
-# define KEY_FORWARDMAIL 233
-# define KEY_SAVE 234
-# define KEY_DOCUMENTS 235
-#endif
-
/* vm_insert_page() was added in 2.6.15 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) && defined(_LINUX_MM_H)
static inline int vm_insert_page(struct vm_area_struct *vma,
@@ -78,29 +49,7 @@ static inline int vm_insert_page(struct vm_area_struct *vma,
}
#endif
-/* try_to_freeze() lost its argument. Must appear after linux/sched.h */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(_LINUX_SCHED_H)
-# define try_to_freeze() try_to_freeze(PF_FREEZE)
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
-#ifndef kzalloc
-#define kzalloc(size, flags) \
-({ \
- void *__ret = kmalloc(size, flags); \
- if (__ret) \
- memset(__ret, 0, size); \
- __ret; \
-})
-#endif
-#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)
-# define class_create(a, b) class_simple_create(a, b)
-# define class_destroy(a) class_simple_destroy(a)
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
# define class_device_create(a, b, c, d, e, f, g, h) class_device_create(a, c, d, e, f, g, h)
#endif
/* device_create/destroy added in 2.6.18 */
@@ -128,15 +77,6 @@ static inline int vm_insert_page(struct vm_area_struct *vma,
#define mutex_trylock(a) down_trylock(a)
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) && defined(_LINUX_SCHED_H)
-static inline signed long __sched
-schedule_timeout_interruptible(signed long timeout)
-{
- __set_current_state(TASK_INTERRUPTIBLE);
- return schedule_timeout(timeout);
-}
-#endif
-
/* New 4GB DMA zone was added in 2.6.15-rc2 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
# define __GFP_DMA32 __GFP_DMA
@@ -160,25 +100,6 @@ static inline void setup_timer(struct timer_list * timer,
#define IRQF_DISABLED SA_INTERRUPT
#endif
-/* linux/usb.h must be included _before_ compat.h for this code to get
- turned on. We can not just include usb.h here, because there is a
- lot of code which will not compile if it has usb.h included, due to
- conflicts with symbol names. */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && \
- defined(__LINUX_USB_H) && defined(_INPUT_H)
-#include <linux/input.h>
-/* Found in linux/usb_input.h in 2.6.13 */
-/* Moved to linux/usb/input.h in 2.6.18 */
-static inline void
-usb_to_input_id(const struct usb_device *dev, struct input_id *id)
-{
- id->bustype = BUS_USB;
- id->vendor = le16_to_cpu(dev->descriptor.idVendor);
- id->product = le16_to_cpu(dev->descriptor.idProduct);
- id->version = le16_to_cpu(dev->descriptor.bcdDevice);
-}
-#endif
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
# define PCIAGP_FAIL 0
@@ -206,11 +127,6 @@ typedef int bool;
#define SONY_PIC_COMMAND_SETCAMERA SONYPI_COMMAND_SETCAMERA
#endif
-/* Parameter to pci_match_device() changed in 2.6.13-rc2 */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(LINUX_PCI_H)
-#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