]> git.karo-electronics.de Git - linux-beck.git/commit
staging: comedi: usbduxfast: introduce usbduxfast_cmd_data()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 14 May 2013 20:41:30 +0000 (13:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2013 23:24:31 +0000 (16:24 -0700)
commit17fdeba07662e68bf3d9a7270292f0fef9c9fe2d
treee5289fbc3f4739c08ecafb5fa298b26eed917aad
parentebe9f1cf2c92c23d7f1ef1bdd399b6d94669a0b7
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>
drivers/staging/comedi/drivers/usbduxfast.c