For COMEDI_BUFINFO ioctl, if subdevice has no async capability, set
authorIan Abbott <abbotti@mev.co.uk>
Mon, 17 May 2010 11:26:07 +0000 (11:26 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 17 May 2010 11:26:07 +0000 (11:26 +0000)
bytes_read and bytes_written to 0 in returned structure.

comedi/comedi_fops.c

index a638667547d5ac86cac0bed37765b77716536c35..0e9bf33b9cc1610fd6df030f0cc2fdd874c98aad 100644 (file)
@@ -594,6 +594,8 @@ static int do_bufinfo_ioctl(comedi_device * dev, void *arg)
                bi.buf_read_ptr = 0;
                bi.buf_write_count = 0;
                bi.buf_read_count = 0;
+               bi.bytes_read = 0;
+               bi.bytes_written = 0;
                goto copyback;
        }