Staging: comedi: COMEDI_BUFINFO with no async - report no bytes read or written

When the COMEDI_BUFINFO ioctl is used on a subdevice without
asynchronous streaming command support, set 'bytes_read = 0' and
'bytes_written = 0' in the buffer info returned back to the user.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Ian Abbott 2010-05-19 18:09:49 +01:00 committed by Greg Kroah-Hartman
parent d261154057
commit 4772c018e3
1 changed files with 2 additions and 0 deletions

View File

@ -584,6 +584,8 @@ static int do_bufinfo_ioctl(struct comedi_device *dev,
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;
}