[PATCH v2 27/32] auxdisplay: remove naive display clear impl

From: poeschel
Date: Mon Sep 21 2020 - 10:48:55 EST


From: Lars Poeschel <poeschel@xxxxxxxxxxx>

Remove the naive (character after character from upper left to lower
right) display clear implementation in charlcd_clear_fast. It was a
fallback and we fall back to using the clear_display implementation
instead.

Signed-off-by: Lars Poeschel <poeschel@xxxxxxxxxxx>
---
drivers/auxdisplay/charlcd.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index ef448c42abbd..0137e741c5bb 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -127,21 +127,13 @@ static void charlcd_print(struct charlcd *lcd, char c)

static void charlcd_clear_fast(struct charlcd *lcd)
{
- int x, y;
-
if (lcd->ops->clear_fast)
lcd->ops->clear_fast(lcd);
- else {
- for (y = 0; y < lcd->height; y++) {
- lcd->addr.x = 0;
- lcd->addr.y = y;
- lcd->ops->gotoxy(lcd);
- for (x = 0; x < lcd->width; x++)
- lcd->ops->print(lcd, ' ');
- }
+ else
+ lcd->ops->clear_display(lcd);

- lcd->ops->home(lcd);
- }
+ lcd->addr.x = 0;
+ lcd->addr.y = 0;
}

/*
--
2.28.0