summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/radio/radio-si470x.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/linux/drivers/media/radio/radio-si470x.c b/linux/drivers/media/radio/radio-si470x.c
index 772c3a126..e999b2fc3 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>
@@ -430,9 +432,18 @@ struct si470x_device {
unsigned short registers[RADIO_REGISTER_NUM];
/* RDS receive buffer */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ struct work_struct work;
+#else
struct delayed_work work;
+#endif
+
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;