diff options
author | Douglas Schilling Landgraf <dougsland@gmail.com> | 2008-02-13 23:51:26 -0200 |
---|---|---|
committer | Douglas Schilling Landgraf <dougsland@gmail.com> | 2008-02-13 23:51:26 -0200 |
commit | 14709eca1644316f1fb628e14525e75dac44c591 (patch) | |
tree | 1b8970dc6f7210acfb18cb945e394aa7f869eecc /linux/drivers/media | |
parent | 4e1fb6e4fc1c61531db960676cee59c17496e2ea (diff) | |
download | mediapointer-dvb-s2-14709eca1644316f1fb628e14525e75dac44c591.tar.gz mediapointer-dvb-s2-14709eca1644316f1fb628e14525e75dac44c591.tar.bz2 |
radio-si470x: Add kernel validation to mutex
From: Douglas Schilling Landgraf <dougsland@gmail.com>
Added kernel validation to support mutex/semaphore. (kernel < 2.6.16)
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Diffstat (limited to 'linux/drivers/media')
-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; |