From: H Hartley Sweeten Date: Tue, 14 May 2013 20:41:30 +0000 (-0700) Subject: staging: comedi: usbduxfast: introduce usbduxfast_cmd_data() X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~76^2~637 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17fdeba07662e68bf3d9a7270292f0fef9c9fe2d;p=pandora-kernel.git 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed