]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: comedi: don't write to buffer if command finished
authorIan Abbott <abbotti@mev.co.uk>
Wed, 19 May 2010 16:22:41 +0000 (17:22 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Jun 2010 20:38:53 +0000 (13:38 -0700)
commitc7900cc61cea4346330242527d016564e173f206
tree34c298f6a4390675b1e87a17893793d7e2925f1d
parent56ae41a5e0ded165f702ec3dfd19566d4f16148d
Staging: comedi: don't write to buffer if command finished

For write(), any data copied to the data buffer after the previously
set up streaming acquisition command has finished won't be used, but a
non-empty write() does not currently return 0 (or -EPIPE on error) after
the command has finished until the data buffer has been filled up.
Change this behavior to return 0 (or -EPIPE) any time after the command
has finished, without bothering to fill up the buffer with more useless
data.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/comedi_fops.c