Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54bc937f authored by Sean Young's avatar Sean Young Committed by Miguel Ojeda
Browse files

auxdisplay: charlcd: no need to call charlcd_gotoxy() if nothing changes



If the line extends beyond the width to the screen, nothing changes. The
existing code will call charlcd_gotoxy every time for this case.

Signed-off-by: default avatarSean Young <sean@mess.org>
Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
parent 7223310f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -192,11 +192,12 @@ static void charlcd_print(struct charlcd *lcd, char c)
			c = lcd->char_conv[(unsigned char)c];
		lcd->ops->write_data(lcd, c);
		priv->addr.x++;
	}

		/* prevents the cursor from wrapping onto the next line */
		if (priv->addr.x == lcd->bwidth)
			charlcd_gotoxy(lcd);
	}
}

static void charlcd_clear_fast(struct charlcd *lcd)
{