Skip to content

Commit c8ffef9

Browse files
cpackham-atlnzandy-shev
authored andcommitted
auxdisplay: linedisp: Support configuring the boot message
Like we do for charlcd, allow the configuration of the initial message on line-display devices. Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 1bbf5a2 commit c8ffef9

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

drivers/auxdisplay/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ endif # PARPORT_PANEL
316316

317317
config PANEL_CHANGE_MESSAGE
318318
bool "Change LCD initialization message ?"
319-
depends on CHARLCD
319+
depends on CHARLCD || LINEDISP
320320
help
321321
This allows you to replace the boot message indicating the kernel version
322322
and the driver version with a custom message. This is useful on appliances

drivers/auxdisplay/line-display.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
* Copyright (C) 2021 Glider bv
99
*/
1010

11+
#ifndef CONFIG_PANEL_BOOT_MESSAGE
1112
#include <generated/utsrelease.h>
13+
#endif
1214

1315
#include <linux/container_of.h>
1416
#include <linux/device.h>
@@ -312,6 +314,12 @@ static int linedisp_init_map(struct linedisp *linedisp)
312314
return 0;
313315
}
314316

317+
#ifdef CONFIG_PANEL_BOOT_MESSAGE
318+
#define LINEDISP_INIT_TEXT CONFIG_PANEL_BOOT_MESSAGE
319+
#else
320+
#define LINEDISP_INIT_TEXT "Linux " UTS_RELEASE " "
321+
#endif
322+
315323
/**
316324
* linedisp_register - register a character line display
317325
* @linedisp: pointer to character line display structure
@@ -359,7 +367,7 @@ int linedisp_register(struct linedisp *linedisp, struct device *parent,
359367
goto out_del_timer;
360368

361369
/* display a default message */
362-
err = linedisp_display(linedisp, "Linux " UTS_RELEASE " ", -1);
370+
err = linedisp_display(linedisp, LINEDISP_INIT_TEXT, -1);
363371
if (err)
364372
goto out_del_dev;
365373

0 commit comments

Comments
 (0)