diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/radio/radio-si470x.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/drivers/media/radio/radio-si470x.c b/linux/drivers/media/radio/radio-si470x.c index 772c3a126..d7fe70a00 100644 --- a/linux/drivers/media/radio/radio-si470x.c +++ b/linux/drivers/media/radio/radio-si470x.c @@ -114,7 +114,9 @@ #include <linux/version.h> #include "compat.h" #include <linux/videodev2.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16) #include <linux/mutex.h> +#endif #include <media/v4l2-common.h> #include <media/rds.h> #include <asm/unaligned.h> @@ -432,7 +434,11 @@ struct si470x_device { /* RDS receive buffer */ struct delayed_work work; wait_queue_head_t read_queue; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16) struct mutex lock; /* buffer locking */ +#else + struct semaphore lock; /* buffer locking */ +#endif unsigned char *buffer; /* size is always multiple of three */ unsigned int buf_size; unsigned int rd_index; |