[PATCH 5/8] staging: comedi: allow buffer wraparound in comedi_write()

2015-11-18 Thread Ian Abbott
`comedi_write()` copies data from the user buffer to the acquisition data buffer, which is cyclic, using a single call to `copy_from_user()`. It currently avoids having to deal with wraparound of the cyclic buffer by limiting the amount it copies (and the amount returned to the user). Change it to

[PATCH 5/8] staging: comedi: allow buffer wraparound in comedi_write()

2015-11-18 Thread Ian Abbott
`comedi_write()` copies data from the user buffer to the acquisition data buffer, which is cyclic, using a single call to `copy_from_user()`. It currently avoids having to deal with wraparound of the cyclic buffer by limiting the amount it copies (and the amount returned to the user). Change it to