summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-08-18 08:22:06 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-08-18 08:22:06 -0300
commit96cbbc792854ad33325f55e2b095d27d195537e7 (patch)
tree0a1a2b20fbc58ae19955e65e30193faf330fc26d /v4l
parent043941b563e911ccb213664f4471e985da89147a (diff)
parentf2ead120937d5077a260732019a12e6ed6c6752e (diff)
downloadmediapointer-dvb-s2-96cbbc792854ad33325f55e2b095d27d195537e7.tar.gz
mediapointer-dvb-s2-96cbbc792854ad33325f55e2b095d27d195537e7.tar.bz2
merge: http://linuxtv.org/hg/~tap/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.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index 1162dadac..05bada3bc 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -284,7 +284,10 @@ static inline int vm_insert_page(struct vm_area_struct *vma,
# define class_destroy(a) class_simple_destroy(a)
#elif 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)
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+#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 */
# define device_create(a, b, c, d, e, f, g) class_device_create(a, NULL, c, b, d, e, f, g)
# define device_destroy(a, b) class_device_destroy(a, b)
#endif
@@ -399,6 +402,32 @@ 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
+
#endif
/*
* Local variables: