From 377cf2cbfdb962579eedf2c29845c463c6973f7e Mon Sep 17 00:00:00 2001 From: Lars Poeschel Date: Tue, 3 Nov 2020 10:58:23 +0100 Subject: auxdisplay: hd44780: Remove clear_fast We remove the hd44780_clear_fast (display) clear implementation. With the new timeout the normal clear_display is reasonably fast. So there is no need for a clear_fast anymore. Link: https://lore.kernel.org/lkml/20200922092121.GG16421@1wt.eu/ Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/charlcd.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'drivers/auxdisplay/charlcd.c') diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 0f0568a4bd35..077c01e87127 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -125,20 +125,11 @@ static void charlcd_print(struct charlcd *lcd, char c) lcd->ops->gotoxy(lcd); } -static void charlcd_clear_fast(struct charlcd *lcd) +static void charlcd_clear_display(struct charlcd *lcd) { - struct hd44780_common *hdc = lcd->drvdata; - int pos; - - charlcd_home(lcd); - - if (lcd->ops->clear_fast) - lcd->ops->clear_fast(lcd); - else - for (pos = 0; pos < min(2, lcd->height) * hdc->hwidth; pos++) - lcd->ops->print(lcd, ' '); - - charlcd_home(lcd); + lcd->ops->clear_display(lcd); + lcd->addr.x = 0; + lcd->addr.y = 0; } /* @@ -409,7 +400,7 @@ static void charlcd_write_char(struct charlcd *lcd, char c) break; case '\f': /* quickly clear the display */ - charlcd_clear_fast(lcd); + charlcd_clear_display(lcd); break; case '\n': /* @@ -448,7 +439,7 @@ static void charlcd_write_char(struct charlcd *lcd, char c) if (!strcmp(priv->esc_seq.buf, "[2J")) { /* clear the display */ - charlcd_clear_fast(lcd); + charlcd_clear_display(lcd); processed = 1; } else if (!strcmp(priv->esc_seq.buf, "[H")) { /* cursor to home */ -- cgit v1.2.3