From abbotti@mev.co.uk Tue Jun 1 13:24:13 2010 From: Ian Abbott Date: Wed, 19 May 2010 18:09:49 +0100 Subject: Staging: comedi: COMEDI_BUFINFO with no async - report no bytes read or written Cc: Greg Kroah-Hartman , Frank Mori Hess , Ian Abbott Message-ID: <1274288990-30318-1-git-send-email-abbotti@mev.co.uk> 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -584,6 +584,8 @@ static int do_bufinfo_ioctl(struct comed 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; }