summaryrefslogtreecommitdiffstats
path: root/drivers/auxdisplay/charlcd.c
diff options
context:
space:
mode:
authorLars Poeschel <poeschel@lemonage.de>2020-11-03 10:58:23 +0100
committerMiguel Ojeda <ojeda@kernel.org>2020-11-04 11:04:04 +0100
commit377cf2cbfdb962579eedf2c29845c463c6973f7e (patch)
tree250fd65498641eeeae51213e1ededf19e07fc45c /drivers/auxdisplay/charlcd.c
parent7b231bb5d0bee86afc40db9ddfd50ba39ef73769 (diff)
downloadlinux-377cf2cbfdb962579eedf2c29845c463c6973f7e.tar.bz2
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 <poeschel@lemonage.de> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'drivers/auxdisplay/charlcd.c')
-rw-r--r--drivers/auxdisplay/charlcd.c21
1 files changed, 6 insertions, 15 deletions
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 */