From 3d482117ca1f1846a019f59f91466eb5f3306671 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 17 Jul 2008 16:30:11 +0200 Subject: gspca/tea575x-tuner: fix compilation for kernels <= 2.6.17 From: Hans Verkuil Signed-off-by: Hans Verkuil --- linux/drivers/media/video/gspca/gspca.c | 4 ++++ linux/sound/i2c/other/tea575x-tuner.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'linux') diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c index 4d65b1be4..697202d47 100644 --- a/linux/drivers/media/video/gspca/gspca.c +++ b/linux/drivers/media/video/gspca/gspca.c @@ -30,7 +30,11 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) +#include +#else #include +#endif #include #include "gspca.h" diff --git a/linux/sound/i2c/other/tea575x-tuner.c b/linux/sound/i2c/other/tea575x-tuner.c index a7fbe18d0..4ac049ad0 100644 --- a/linux/sound/i2c/other/tea575x-tuner.c +++ b/linux/sound/i2c/other/tea575x-tuner.c @@ -167,10 +167,12 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file, struct video_audio v; if(copy_from_user(&v, arg, sizeof(v))) return -EFAULT; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) if (tea->ops->mute) tea->ops->mute(tea, (v.flags & VIDEO_AUDIO_MUTE) ? 1 : 0); +#endif if(v.audio) return -EINVAL; return 0; @@ -223,9 +225,11 @@ void snd_tea575x_init(struct snd_tea575x *tea) snd_tea575x_set_freq(tea); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) /* mute on init */ if (tea->ops->mute) tea->ops->mute(tea, 1); +#endif } #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) -- cgit v1.2.3