From: Kelley Nielsen Date: Wed, 6 Nov 2013 13:08:11 +0000 (-0800) Subject: staging: ft1000: extract helper handle_misc_portid() X-Git-Tag: v3.14-rc1~150^2~775^2~232 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a58cad260bd37b7d20d222b083b4844d086b2d7;p=pandora-kernel.git staging: ft1000: extract helper handle_misc_portid() The function ft1000_poll, in ft1000_hw.c, is complex, with deep levels of nesting, unnecessary variables, and style issues. Extract the default case of the switch statement to its own function, handle_misc_portid. Make the variable struct dpram_blk *pdpram_blk local to the new function and remove it from the old. The variable struct pseudo_hdr *ppseudo_hdr is used only once, to access a member of another struct, so eliminate it and access the member directly. Return -1 in all the places where the code fails, and 0 on successful completion. Fix coding style errors. Signed-off-by: Kelley Nielsen Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed