Skip to contentSkip to conversation

staging: sm750fb: remove function pointer proc_setBLANK

PATCH New Kisub Choe 1 participant 1 message Jun 20, 2025

Subsystems (3)
lore
Share & tools
lore

Kisub Choe

author
#0 lore raw

PATCH v2 1/1 staging: sm750fb: remove function pointer proc_setBLANK

Call a function based on sm750_dev->revid
instead of using this indirection

---
Changes in v2:
- removed the function pointer in accordance with the feedback

---
 drivers/staging/sm750fb/sm750.c | 10 +++++++---
 drivers/staging/sm750fb/sm750.h |  2 --
 2 files changed, 7 insertions(+), 5 deletions(-)
drivers/staging/sm750fb/sm750.c +7 -3
index 1d929aca399c..b65a527314f1 100644
@@ -571,13 +571,19 @@ static int lynxfb_ops_setcolreg(unsigned int regno,
 
 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;
drivers/staging/sm750fb/sm750.h +0 -2
index 9cf8b3d30aac..640bff625052 100644
@@ -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 {
Signature · 1 line
2.34.1