aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2010-05-19 18:09:49 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-04 13:38:53 -0700
commit4772c018e35b6a21e8a8bde54568b59998540a16 (patch)
tree15aa77b0981f17e100f8303a4754ad2b5752eeee /drivers/staging
parentStaging: comedi: don't write to buffer if command finished (diff)
downloadlinux-dev-4772c018e35b6a21e8a8bde54568b59998540a16.tar.xz
linux-dev-4772c018e35b6a21e8a8bde54568b59998540a16.zip
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/comedi_fops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 39ed22b80229..75256251250d 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -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;
}