]> git.karo-electronics.de Git - linux-beck.git/commit
staging/xgifb: Consolidate function almost identical calls in XGINew_GetXG21Sense
authorPeter Huewe <peterhuewe@gmx.de>
Mon, 13 May 2013 21:41:47 +0000 (23:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2013 23:02:34 +0000 (16:02 -0700)
commit9195ba095d452ed1689570b938e9b5780b2b38a3
tree60093dbe188d27fcdc841303b9435af1301317a3
parentbcd1f16573e1975c8a78a29bbc68e483970d9bd8
staging/xgifb: Consolidate function almost identical calls in XGINew_GetXG21Sense

Instead of calling xgifb_reg_and_or with almost identical parameters in
a simple if/else scenario, we assign the changing parameter to a temp
variable and call xgifb_reg_and_or only from one location.

-> Easier to read, easier to understand (especially wrt the line breaks)

(For the if condition we don't need the Temp variable, so we can use the
value directly).

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/vb_init.c