summaryrefslogtreecommitdiff
path: root/v4l/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/compat.h')
-rw-r--r--v4l/compat.h75
1 files changed, 0 insertions, 75 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index b59d0ed04..d32806e9b 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -39,19 +39,6 @@
# define I2C_M_IGNORE_NAK 0x1000
#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,
- unsigned long addr, struct page *page)
-{
- return remap_pfn_range(vma, addr, page_to_pfn(page), PAGE_SIZE,
- vma->vm_page_prot);
-}
-#endif
-
-#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 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
/* on older kernels, class_device_create will in turn be a compat macro */
@@ -59,42 +46,6 @@ static inline int vm_insert_page(struct vm_area_struct *vma,
# define device_destroy(a, b) class_device_destroy(a, b)
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
-# define input_allocate_device() kzalloc(sizeof(struct input_dev),GFP_KERNEL);
-# define input_free_device(input_dev) kfree(input_dev)
-# ifdef _INPUT_H /* input.h must be included _before_ compat.h for this to work */
- /* input_register_device() was changed to return an error code in 2.6.15 */
-# define input_register_device(x) (input_register_device(x), 0)
-# endif
-#endif
-
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-#define DEFINE_MUTEX(a) DECLARE_MUTEX(a)
-#define mutex_lock_interruptible(a) down_interruptible(a)
-#define mutex_unlock(a) up(a)
-#define mutex_lock(a) down(a)
-#define mutex_init(a) init_MUTEX(a)
-#define mutex_trylock(a) down_trylock(a)
-#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
-#endif
-
-/* setup_timer() helper added 10/31/05, 2.6.15-rc1 */
-/* Need linux/timer.h to be included for struct timer_list */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) && defined(_LINUX_TIMER_H)
-static inline void setup_timer(struct timer_list * timer,
- void (*function)(unsigned long),
- unsigned long data)
-{
- timer->function = function;
- timer->data = data;
- init_timer(timer);
-}
-#endif
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#define IRQF_SHARED SA_SHIRQ
#define IRQF_DISABLED SA_INTERRUPT
@@ -136,32 +87,6 @@ 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
-/* ALSA removed a bunch of typedefs and renamed some structs in 2.6.16 */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
-# ifdef __SOUND_CORE_H
-# define snd_card _snd_card /* struct _snd_card became struct snd_card */
-# define snd_pcm _snd_pcm
-# undef snd_device
-# define snd_device _snd_device
-# endif
-# ifdef __SOUND_PCM_H
-# define snd_pcm_substream _snd_pcm_substream
-# define snd_pcm_hardware _snd_pcm_hardware
-# define snd_pcm_runtime _snd_pcm_runtime
-# define snd_pcm_ops _snd_pcm_ops
-# endif
-# ifdef __SOUND_ASOUND_H
-# define snd_pcm_hw_params sndrv_pcm_hw_params
-# define snd_ctl_elem_info sndrv_ctl_elem_info
-# define snd_ctl_elem_value sndrv_ctl_elem_value
-# endif
-# ifdef __SOUND_CONTROL_H
-# undef snd_kcontrol
-# define snd_kcontrol _snd_kcontrol
-# define snd_kcontrol_new _snd_kcontrol_new
-# endif
-#endif
-
#if defined(COMPAT_PCM_TO_RATE_BIT) && defined(__SOUND_PCM_H)
/* New alsa core utility function */
static inline unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate)