From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Lars Poeschel <poeschel@lemonage.de>, Willy Tarreau <w@1wt.eu>,
Miguel Ojeda <ojeda@kernel.org>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.10.y 1/2] auxdisplay: Move init_display to hd44780_common
Date: Tue, 8 Sep 2026 08:20:33 -0400 [thread overview]
Message-ID: <20260908122034.2053198-1-sashal@kernel.org> (raw)
In-Reply-To: <2026090350-stencil-mud-1d68@gregkh>
From: Lars Poeschel <poeschel@lemonage.de>
[ Upstream commit 01ec46dfa633a52ccfe38d4a194460d6adb2ba00 ]
The init_display function is moved over to hd44780_common. charlcd uses
it via its ops function pointer and drivers initialize the ops with the
common hd44780_common_init_display function.
Reviewed-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
[ stable 5.10: The hd44780_common infrastructure and the prerequisite
refactoring series are not present. Drop the init_display move and carry
only the charlcd backlight enum normalization needed by the follow-up fix. ]
[ sashal: Reduced backport -- upstream 01ec46dfa633a touches 6 file(s), this
backport carries 2. Not backported here:
drivers/auxdisplay/hd44780.c
drivers/auxdisplay/hd44780_common.c
drivers/auxdisplay/hd44780_common.h
drivers/auxdisplay/panel.c
This note is generated from the file lists only; see the resolution record
for the reasoning. ]
Stable-dep-of: e3e3bf40916c ("auxdisplay: charlcd: cancel backlight work on registration failure")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/auxdisplay/charlcd.c | 6 +++---
drivers/auxdisplay/charlcd.h | 5 +++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 5aee0f5463514..e74e25ff030b2 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -124,7 +124,7 @@ static void charlcd_bl_off(struct work_struct *work)
if (priv->bl_tempo) {
priv->bl_tempo = false;
if (!(priv->flags & LCD_FLAG_L))
- priv->lcd.ops->backlight(&priv->lcd, 0);
+ priv->lcd.ops->backlight(&priv->lcd, CHARLCD_OFF);
}
mutex_unlock(&priv->bl_tempo_lock);
}
@@ -141,7 +141,7 @@ void charlcd_poke(struct charlcd *lcd)
mutex_lock(&priv->bl_tempo_lock);
if (!priv->bl_tempo && !(priv->flags & LCD_FLAG_L))
- lcd->ops->backlight(lcd, 1);
+ lcd->ops->backlight(lcd, CHARLCD_ON);
priv->bl_tempo = true;
schedule_delayed_work(&priv->bl_work, LCD_BL_TEMPO_PERIOD * HZ);
mutex_unlock(&priv->bl_tempo_lock);
@@ -862,7 +862,7 @@ int charlcd_unregister(struct charlcd *lcd)
the_charlcd = NULL;
if (lcd->ops->backlight) {
cancel_delayed_work_sync(&priv->bl_work);
- priv->lcd.ops->backlight(&priv->lcd, 0);
+ priv->lcd.ops->backlight(&priv->lcd, CHARLCD_OFF);
}
return 0;
diff --git a/drivers/auxdisplay/charlcd.h b/drivers/auxdisplay/charlcd.h
index 00911ad0f3deb..993f03652f2a8 100644
--- a/drivers/auxdisplay/charlcd.h
+++ b/drivers/auxdisplay/charlcd.h
@@ -9,6 +9,11 @@
#ifndef _CHARLCD_H
#define _CHARLCD_H
+enum charlcd_onoff {
+ CHARLCD_OFF = 0,
+ CHARLCD_ON,
+};
+
struct charlcd {
const struct charlcd_ops *ops;
const unsigned char *char_conv; /* Optional */
--
2.53.0
next prev parent reply other threads:[~2026-09-08 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 13:45 FAILED: patch "[PATCH] auxdisplay: charlcd: cancel backlight work on registration" failed to apply to 5.10-stable tree gregkh
2026-09-08 12:20 ` Sasha Levin [this message]
2026-09-08 12:20 ` [PATCH 5.10.y 2/2] auxdisplay: charlcd: cancel backlight work on registration failure Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260908122034.2053198-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=ojeda@kernel.org \
--cc=poeschel@lemonage.de \
--cc=stable@vger.kernel.org \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox