]> err.no Git - linux-2.6/commitdiff
V4L/DVB (3129): correct FE_READ_UNCORRECTED_BLOCKS
authorStephen Williams <stephen.gw@gmail.com>
Mon, 9 Jan 2006 17:25:21 +0000 (15:25 -0200)
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>
Mon, 9 Jan 2006 17:25:21 +0000 (15:25 -0200)
- 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 <stephen.williams@gmail.com>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
drivers/media/dvb/cinergyT2/cinergyT2.c

index 1d69bf031fb97efdce8c04c1e32520fa074a4bcc..e2598bbc2bb5e268735e21af0e56e683e9d5d4fb 100644 (file)
@@ -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;