parisc: chassis: Do not overwrite string on LCD display
authorHelge Deller <deller@gmx.de>
Sun, 27 Aug 2023 11:54:12 +0000 (13:54 +0200)
committerHelge Deller <deller@gmx.de>
Mon, 28 Aug 2023 15:58:14 +0000 (17:58 +0200)
If we send a chassis code via PDC, PDC usually overwrites the
contents on the LCD display. Just call lcd_print() in this case
so that the LCD/LED driver prints the last string again.

Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/pdc_chassis.c

index 0a9d700..d477d01 100644 (file)
@@ -31,6 +31,7 @@
 #include <asm/processor.h>
 #include <asm/pdc.h>
 #include <asm/pdcpat.h>
+#include <asm/led.h>
 
 #define PDC_CHASSIS_VER        "0.05"
 
@@ -234,6 +235,11 @@ int pdc_chassis_send_status(int message)
                } else retval = -1;
 #endif /* CONFIG_64BIT */
        }       /* if (pdc_chassis_enabled) */
+
+       /* if system has LCD display, update current string */
+       if (retval != -1 && IS_ENABLED(CONFIG_CHASSIS_LCD_LED))
+               lcd_print(NULL);
+
 #endif /* CONFIG_PDC_CHASSIS */
        return retval;
 }