staging: comedi: usbduxfast: introduce usbduxfast_cmd_data()
Introduce a helper function to set the buffer used to transfer
commands to the usb device.
Each command consists of four uint8_t values that are stored at
specific indexes in the buffer. The helper function consolidates
the code that sets the buffer to reduce coding errors and make
the driver a bit easier to understand.
Note, the '0xff & rngmask' can be reduced to simply 'rngmask'
since the rngmask is always an 8-bit value.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>