lkml.org 
[lkml]   [2020]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 27/32] auxdisplay: remove naive display clear impl
Date
From: Lars Poeschel <poeschel@lemonage.de>

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@lemonage.de>
---
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
\
 
 \ /
  Last update: 2020-09-21 16:49    [W:0.255 / U:4.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site