From: Stephen Williams Date: Mon, 9 Jan 2006 17:25:21 +0000 (-0200) Subject: V4L/DVB (3129): correct FE_READ_UNCORRECTED_BLOCKS X-Git-Tag: v2.6.16-rc1~663^2~88 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2c3f11b20fc6c41b4d3f64f301f525e35f18b6bc;p=linux-2.6-omap-h63xx.git V4L/DVB (3129): correct FE_READ_UNCORRECTED_BLOCKS - Make FE_READ_UNCORRECTED_BLOCKS reset the count after each call, thus returning a momentary value like all other demods do, instead of an absolute, ever increasing count. Signed-off-by: Stephen Williams Signed-off-by: Johannes Stezenbach Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index 1d69bf031fb..e2598bbc2bb 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c @@ -564,10 +564,15 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file, (__u16 __user *) arg); case FE_READ_UNCORRECTED_BLOCKS: - /* UNC are already converted to host byte order... */ - return put_user(stat->uncorrected_block_count, - (__u32 __user *) arg); + { + uint32_t unc_count; + unc_count = stat->uncorrected_block_count; + stat->uncorrected_block_count = 0; + + /* UNC are already converted to host byte order... */ + return put_user(unc_count,(__u32 __user *) arg); + } case FE_SET_FRONTEND: { struct dvbt_set_parameters_msg *param = &cinergyt2->param;