staging/easycap: reduce code duplication for ssa stk settings
authorTomas Winkler <tomas.winkler@intel.com>
Sat, 5 Mar 2011 22:55:21 +0000 (00:55 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Mar 2011 21:52:55 +0000 (13:52 -0800)
commitc0b3a8a034c225727a810977aee0ccd72b2d92c9
treeddf9d962d199a8028cea596ac8e9e2cc6a3109a7
parentfd49b7879890d0f17c1cb86eb07e449d9c9f0699
staging/easycap: reduce code duplication for ssa stk settings

reduce code duplication in register settings

instead of
if (ntsc)
<CODE BLOCK>
else
<CODE BLOCK>
use

cfg = (ntsc) ? <chip>configNTSC : <chip>configPAL;
<CODE BLOCK>

in addition change while loops to more readable for loops

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/easycap/easycap_low.c