Re: [PATCH 3/6] fbcon: fbcon_cursor_noblink -> fbcon_cursor_blink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Am 23.09.24 um 17:57 schrieb Ville Syrjala:
From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Invert fbcon_cursor_noblink into fbcon_cursor_blink so that:
- it matches the sysfs attribute exactly
- avoids having to do these NOT operations all over the place

Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

With the inversion of the default fixed:

Reviewed-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

---
  drivers/video/fbdev/core/fbcon.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index bbe332572ca7..eb30aa872371 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -166,7 +166,7 @@ static const struct consw fb_con;
#define advance_row(p, delta) (unsigned short *)((unsigned long)(p) + (delta) * vc->vc_size_row) -static int fbcon_cursor_noblink;
+static int fbcon_cursor_blink;
#define divides(a, b) ((!(a) || (b)%(a)) ? 0 : 1) @@ -399,7 +399,7 @@ static void fbcon_add_cursor_work(struct fb_info *info)
  {
  	struct fbcon_ops *ops = info->fbcon_par;
- if (!fbcon_cursor_noblink)
+	if (fbcon_cursor_blink)
  		queue_delayed_work(system_power_efficient_wq, &ops->cursor_work,
  				   ops->cur_blink_jiffies);
  }
@@ -3214,7 +3214,7 @@ static ssize_t rotate_show(struct device *device,
  static ssize_t cursor_blink_show(struct device *device,
  				 struct device_attribute *attr, char *buf)
  {
-	return sysfs_emit(buf, "%d\n", !fbcon_cursor_noblink);
+	return sysfs_emit(buf, "%d\n", fbcon_cursor_blink);
  }
static ssize_t cursor_blink_store(struct device *device,
@@ -3230,7 +3230,7 @@ static ssize_t cursor_blink_store(struct device *device,
  	console_lock();
  	idx = con2fb_map[fg_console];
- fbcon_cursor_noblink = !blink;
+	fbcon_cursor_blink = blink;
if (idx == -1 || fbcon_registered_fb[idx] == NULL)
  		goto err;

--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux