staging: xgifb: Improved coding style
authorArushi Singhal <arushisinghal19971997@gmail.com>
Wed, 1 Mar 2017 16:45:15 +0000 (22:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Mar 2017 13:13:51 +0000 (14:13 +0100)
New variable is added to make the code more readable.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/XGI_main_26.c

index 69ed137337ceb32f5b566a8878d2b15327c83c68..9870ea3b76b455c0379729f0bc10fb4fef560bd3 100644 (file)
@@ -878,30 +878,13 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info)
                        }
 
                        if ((filter >= 0) && (filter <= 7)) {
+                               const u8 *f = XGI_TV_filter[filter_tb].filter[filter];
                                pr_debug("FilterTable[%d]-%d: %*ph\n",
-                                        filter_tb, filter,
-                                        4, XGI_TV_filter[filter_tb].
-                                                  filter[filter]);
-                               xgifb_reg_set(
-                                       XGIPART2,
-                                       0x35,
-                                       (XGI_TV_filter[filter_tb].
-                                               filter[filter][0]));
-                               xgifb_reg_set(
-                                       XGIPART2,
-                                       0x36,
-                                       (XGI_TV_filter[filter_tb].
-                                               filter[filter][1]));
-                               xgifb_reg_set(
-                                       XGIPART2,
-                                       0x37,
-                                       (XGI_TV_filter[filter_tb].
-                                               filter[filter][2]));
-                               xgifb_reg_set(
-                                       XGIPART2,
-                                       0x38,
-                                       (XGI_TV_filter[filter_tb].
-                                               filter[filter][3]));
+                                        filter_tb, filter, 4, f);
+                               xgifb_reg_set(XGIPART2, 0x35, f[0]);
+                               xgifb_reg_set(XGIPART2, 0x36, f[1]);
+                               xgifb_reg_set(XGIPART2, 0x37, f[2]);
+                               xgifb_reg_set(XGIPART2, 0x38, f[3]);
                        }
                }
        }