linux/drivers/staging/ft1000
Kelley Nielsen eb2ec63979 staging: ft1000: function write_dpram32_and_check extracted from write_blk
function write_blk is long and overly complex, consisting of a triply
nested loop. It also has improper indentation and line lengths
throughout, and has return type of u32 rather than int. Some of the
lines, when converted to proper indentation, create checkpatch warnings
for too many leading tabs.

This patch extracts the innermost loop into its own function,
write_dpram32_and_check. This removes several levels of indentation from
the extracted lines and makes the original function simpler. Two local
variables from the original function, u16 resultbuffer[] and a loop
counter, have been made local variables of the new function. Two calls
to msleep() have been replaced with usleep_range() as per Documentation/
timers/timers-howto.txt (which was referred to in a checkpatch warning).
Several other style issues in the extracted code have been corrected as
well.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29 08:36:17 -07:00
..
ft1000-pcmcia Staging: ft1000: Fix assignment of bool to 0/1 in ft1000_dnld.c 2013-10-28 15:00:35 -07:00
ft1000-usb staging: ft1000: function write_dpram32_and_check extracted from write_blk 2013-10-29 08:36:17 -07:00
ft1000.h staging: ft1000: unify struct ft1000_info between USB and PCMCIA drivers 2013-01-07 12:33:45 -08:00
Kconfig
Makefile
TODO