mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
staging: comedi: pcmuio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values. Change `pcmuio_handle_intr_subdev()` in the "pcmuio" module to use unsigned sample values for consistency. Also, make the order in which `pcmuio_handle_intr_subdev()` writes the two sample values (each actually containing up to 16 1-bit sample values) independent of the host byte ordering. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f23b65a588
commit
5c174c41d8
1 changed files with 2 additions and 2 deletions
|
|
@ -315,8 +315,8 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev,
|
|||
}
|
||||
|
||||
/* Write the scan to the buffer. */
|
||||
if (comedi_buf_put(s->async, ((short *)&val)[0]) &&
|
||||
comedi_buf_put(s->async, ((short *)&val)[1])) {
|
||||
if (comedi_buf_put(s->async, val) &&
|
||||
comedi_buf_put(s->async, val >> 16)) {
|
||||
s->async->events |= (COMEDI_CB_BLOCK | COMEDI_CB_EOS);
|
||||
} else {
|
||||
/* Overflow! Stop acquisition!! */
|
||||
|
|
|
|||
Loading…
Reference in a new issue