]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: sm750fb: replace lynx_crtc methods with function calls
authorMike Rapoport <mike.rapoport@gmail.com>
Fri, 23 Oct 2015 14:55:10 +0000 (17:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 02:04:13 +0000 (19:04 -0700)
The methods in lynx_crtc always use the same implementation and there is
no point to use redirection rather than direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750.c
drivers/staging/sm750fb/sm750.h

index 7eca4cb3c6568d4ae68aa08a6c79488770d1e9ad..24c4f39c79b7503ae90053bf383cfd14e6ceb6cb 100644 (file)
@@ -304,7 +304,7 @@ static int lynxfb_ops_pan_display(struct fb_var_screeninfo *var,
 
        par = info->par;
        crtc = &par->crtc;
-       return crtc->proc_panDisplay(crtc, var, info);
+       return hw_sm750_pan_display(crtc, var, info);
 }
 
 static int lynxfb_ops_set_par(struct fb_info *info)
@@ -384,7 +384,7 @@ static int lynxfb_ops_set_par(struct fb_info *info)
                pr_err("pixel bpp format not satisfied\n.");
                return ret;
        }
-       ret = crtc->proc_setMode(crtc, var, fix);
+       ret = hw_sm750_crtc_setMode(crtc, var, fix);
        if (!ret)
                ret = output->proc_setMode(output, var, fix);
        return ret;
@@ -581,7 +581,7 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
                return -ENOMEM;
        }
 
-       return crtc->proc_checkMode(crtc, var);
+       return hw_sm750_crtc_checkMode(crtc, var);
 }
 
 static int lynxfb_ops_setcolreg(unsigned regno,
@@ -614,7 +614,7 @@ static int lynxfb_ops_setcolreg(unsigned regno,
                red >>= 8;
                green >>= 8;
                blue >>= 8;
-               ret = crtc->proc_setColReg(crtc, regno, red, green, blue);
+               ret = hw_sm750_setColReg(crtc, regno, red, green, blue);
                goto exit;
        }
 
@@ -669,10 +669,6 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
        /* setup crtc and output member */
        spec_share->hwCursor = g_hwcursor;
 
-       crtc->proc_setMode = hw_sm750_crtc_setMode;
-       crtc->proc_checkMode = hw_sm750_crtc_checkMode;
-       crtc->proc_setColReg = hw_sm750_setColReg;
-       crtc->proc_panDisplay = hw_sm750_pan_display;
        crtc->line_pad = 16;
        crtc->xpanstep = 8;
        crtc->ypanstep = 1;
index c18806173410d9eda58ce40079003bffdfd0fd24..6f5e09d259aa717cebe0dcbe030c04fe7beba85f 100644 (file)
@@ -104,16 +104,6 @@ struct lynxfb_crtc {
 
        void *priv;
 
-       int (*proc_setMode)(struct lynxfb_crtc*,
-                                               struct fb_var_screeninfo*,
-                                               struct fb_fix_screeninfo*);
-
-       int (*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-       int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
-       /* pan display */
-       int (*proc_panDisplay)(struct lynxfb_crtc *,
-                              const struct fb_var_screeninfo *,
-                              const struct fb_info *);
        /* cursor information */
        struct lynx_cursor cursor;
 };