summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2004-12-03 09:10:57 +0000
committerHolger Waechtler <devnull@localhost>2004-12-03 09:10:57 +0000
commit65bbf0e648291aa79c956b9b38adc0627c9759dd (patch)
treefea1eb1d434ccde5b3edd9d17c29cf4d67948a52
parentd81bda97ed48adc30520159fccd85dff6edb9515 (diff)
downloadmediapointer-dvb-s2-65bbf0e648291aa79c956b9b38adc0627c9759dd.tar.gz
mediapointer-dvb-s2-65bbf0e648291aa79c956b9b38adc0627c9759dd.tar.bz2
SET_PARAMETER locking and some event compatibility code for VDR. Thanks to Stefan Lucke for reporting this
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index eef2de260..9a69568a2 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -587,15 +587,24 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file,
if (copy_from_user(&p, (void *) arg, sizeof(p)))
return -EFAULT;
+ if (down_interruptible(&cinergyt2->sem))
+ return -ERESTARTSYS;
+
param->cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS;
param->tps = cpu_to_le16(compute_tps(&p));
param->freq = cpu_to_le32(p.frequency / 1000);
param->bandwidth = 8 - p.u.ofdm.bandwidth - BANDWIDTH_8_MHZ;
+ stat->lock_bits = 0;
+ cinergyt2->pending_fe_events++;
+ wake_up_interruptible(&cinergyt2->poll_wq);
+
err = cinergyt2_command(cinergyt2,
(char *) param, sizeof(*param),
NULL, 0);
+ up(&cinergyt2->sem);
+
return (err < 0) ? err : 0;
}
@@ -608,6 +617,7 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file,
* functionality.
*/
break;
+
case FE_GET_EVENT:
{
/**