]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: sm750fb: remove function pointer proc_setBLANK
authorKisub Choe <kisub.choe.0x1@gmail.com>
Fri, 20 Jun 2025 16:54:32 +0000 (01:54 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Jun 2025 17:13:26 +0000 (19:13 +0200)
Call a function based on sm750_dev->revid
instead of using this indirection

Signed-off-by: Kisub Choe <kisub.choe.0x1@gmail.com>
Link: https://lore.kernel.org/r/aFWSSAcboBVi4ROh@zinc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750.c
drivers/staging/sm750fb/sm750.h

index 62d8701d18dd043f2eb292b86602d5d82bbf3174..b94bdede2993e1cdaa969bd5b86525be569e3ab9 100644 (file)
@@ -571,13 +571,19 @@ exit:
 
 static int lynxfb_ops_blank(int blank, struct fb_info *info)
 {
+       struct sm750_dev *sm750_dev;
        struct lynxfb_par *par;
        struct lynxfb_output *output;
 
        pr_debug("blank = %d.\n", blank);
        par = info->par;
        output = &par->output;
-       return output->proc_setBLANK(output, blank);
+       sm750_dev = par->dev;
+
+       if (sm750_dev->revid == SM750LE_REVISION_ID)
+               return hw_sm750le_set_blank(output, blank);
+       else
+               return hw_sm750_set_blank(output, blank);
 }
 
 static int sm750fb_set_drv(struct lynxfb_par *par)
@@ -605,8 +611,6 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
        crtc->ypanstep = 1;
        crtc->ywrapstep = 0;
 
-       output->proc_setBLANK = (sm750_dev->revid == SM750LE_REVISION_ID) ?
-                                hw_sm750le_set_blank : hw_sm750_set_blank;
        /* chip specific phase */
        sm750_dev->accel.de_wait = (sm750_dev->revid == SM750LE_REVISION_ID) ?
                                    hw_sm750le_de_wait : hw_sm750_de_wait;
index 52ccf1b51630e0c9bef469d5582b1df8c8c207e8..d7f40efe3a2ce4580a03865386de1ed724aec38c 100644 (file)
@@ -169,8 +169,6 @@ struct lynxfb_output {
         * output->channel ==> &crtc->channel
         */
        void *priv;
-
-       int (*proc_setBLANK)(struct lynxfb_output *output, int blank);
 };
 
 struct lynxfb_par {