viafb: simplify viafb_fill_crtc_timing
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Thu, 2 Jun 2011 14:03:53 +0000 (14:03 +0000)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Fri, 5 Aug 2011 12:47:27 +0000 (12:47 +0000)
As the first argument is just part of the structure passed as the
second argument there is no need for it at all.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/via/dvi.c
drivers/video/via/hw.c
drivers/video/via/hw.h

index b1f3647..c7ff5c0 100644 (file)
@@ -190,12 +190,10 @@ void viafb_dvi_set_mode(struct VideoModeTable *mode, int mode_bpp,
        if ((maxPixelClock != 0) && (desirePixelClock > maxPixelClock)) {
                rb_mode = viafb_get_rb_mode(mode->crtc[0].crtc.hor_addr,
                        mode->crtc[0].crtc.ver_addr);
-               if (rb_mode) {
+               if (rb_mode)
                        mode = rb_mode;
-                       pDviTiming = rb_mode->crtc;
-               }
        }
-       viafb_fill_crtc_timing(pDviTiming, mode, mode_bpp / 8, set_iga);
+       viafb_fill_crtc_timing(mode, mode_bpp / 8, set_iga);
 }
 
 /* Sense DVI Connector */
index 8b4bdf5..2050fb8 100644 (file)
@@ -1467,9 +1467,10 @@ void viafb_set_vclock(u32 clk, int set_iga)
        via_write_misc_reg_mask(0x0C, 0x0C); /* select external clock */
 }
 
-void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
-       struct VideoModeTable *video_mode, int bpp_byte, int set_iga)
+void viafb_fill_crtc_timing(struct VideoModeTable *video_mode, int bpp_byte,
+       int set_iga)
 {
+       struct crt_mode_table *crt_table = video_mode->crtc;
        struct display_timing crt_reg;
        int i;
        int index = 0;
@@ -1911,11 +1912,10 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
        if (viafb_CRT_ON) {
                if (viafb_SAMM_ON &&
                        viaparinfo->shared->iga2_devices & VIA_CRT) {
-                       viafb_fill_crtc_timing(crt_timing1, vmode_tbl1,
-                               video_bpp1 / 8, IGA2);
+                       viafb_fill_crtc_timing(vmode_tbl1, video_bpp1 / 8,
+                               IGA2);
                } else {
-                       viafb_fill_crtc_timing(crt_timing, vmode_tbl,
-                               video_bpp / 8,
+                       viafb_fill_crtc_timing(vmode_tbl, video_bpp / 8,
                                (viaparinfo->shared->iga1_devices & VIA_CRT)
                                ? IGA1 : IGA2);
                }
index 267c669..1fd8d98 100644 (file)
@@ -637,8 +637,8 @@ extern int viafb_LCD_ON;
 extern int viafb_DVI_ON;
 extern int viafb_hotplug;
 
-void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
-       struct VideoModeTable *video_mode, int bpp_byte, int set_iga);
+void viafb_fill_crtc_timing(struct VideoModeTable *video_mode, int bpp_byte,
+       int set_iga);
 
 void viafb_set_vclock(u32 CLK, int set_iga);
 void viafb_load_reg(int timing_value, int viafb_load_reg_num,