From 55bbf9ebe5fe633a2de974389ac6dbb9305ba89f Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Tue, 13 Mar 2018 01:07:37 +0100 Subject: [PATCH 01/15] Doc: misc-devices: move lcd-panel-cgram.txt to auxdisplay/ Commit 7005b58458e4beecaf5efacb872c456bc7d3541a ("Staging: add lcd-panel driver") introduced the panel driver, which is now in drivers/auxdisplay. Cc: Willy Tarreau Cc: Jonathan Corbet Signed-off-by: Miguel Ojeda --- Documentation/{misc-devices => auxdisplay}/lcd-panel-cgram.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Documentation/{misc-devices => auxdisplay}/lcd-panel-cgram.txt (100%) diff --git a/Documentation/misc-devices/lcd-panel-cgram.txt b/Documentation/auxdisplay/lcd-panel-cgram.txt similarity index 100% rename from Documentation/misc-devices/lcd-panel-cgram.txt rename to Documentation/auxdisplay/lcd-panel-cgram.txt From 6fd8e4f4907b1f6b61e6b2e89f2f54ef9b8aa3c1 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Sat, 10 Feb 2018 10:56:51 +0100 Subject: [PATCH 02/15] MAINTAINERS: auxdisplay: remove obsolete webpages Acked-by: Randy Dunlap Signed-off-by: Miguel Ojeda --- MAINTAINERS | 8 -------- 1 file changed, 8 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6e950b8b4a41..f030e360f905 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2487,8 +2487,6 @@ F: kernel/audit* AUXILIARY DISPLAY DRIVERS M: Miguel Ojeda Sandonis -W: http://miguelojeda.es/auxdisplay.htm -W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm S: Maintained F: drivers/auxdisplay/ F: include/linux/cfag12864b.h @@ -3376,16 +3374,12 @@ F: include/linux/usb/wusb* CFAG12864B LCD DRIVER M: Miguel Ojeda Sandonis -W: http://miguelojeda.es/auxdisplay.htm -W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm S: Maintained F: drivers/auxdisplay/cfag12864b.c F: include/linux/cfag12864b.h CFAG12864BFB LCD FRAMEBUFFER DRIVER M: Miguel Ojeda Sandonis -W: http://miguelojeda.es/auxdisplay.htm -W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm S: Maintained F: drivers/auxdisplay/cfag12864bfb.c F: include/linux/cfag12864b.h @@ -7873,8 +7867,6 @@ F: kernel/kprobes.c KS0108 LCD CONTROLLER DRIVER M: Miguel Ojeda Sandonis -W: http://miguelojeda.es/auxdisplay.htm -W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm S: Maintained F: Documentation/auxdisplay/ks0108 F: drivers/auxdisplay/ks0108.c From b1bf6119dc5f83bcdfd917bfcf7d0836f896c50b Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Tue, 13 Mar 2018 00:59:40 +0100 Subject: [PATCH 03/15] auxdisplay: arm-charlcd: Fix struct charlcd doc line There was a missing first line and a missing member, which gave a warning under W=1: CC drivers/auxdisplay/arm-charlcd.o drivers/auxdisplay/arm-charlcd.c:57: warning: Cannot understand * @dev: a pointer back to containing device on line 57 - I thought it was a doc line Cc: Randy Dunlap Reviewed-by: Linus Walleij Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/arm-charlcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c index b3176ee92b90..dde180995582 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -54,12 +54,14 @@ #define HD_BUSY_FLAG 0x80U /** + * struct charlcd - Private data structure * @dev: a pointer back to containing device * @phybase: the offset to the controller in physical memory * @physize: the size of the physical page * @virtbase: the offset to the controller in virtual memory * @irq: reserved interrupt number * @complete: completion structure for the last LCD command + * @init_work: delayed work structure to initialize the display on boot */ struct charlcd { struct device *dev; From 0186a092ff5906aade822c3f8a5446fb5d7fa647 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 10 Feb 2018 15:14:05 +0100 Subject: [PATCH 04/15] auxdisplay: img-ascii-lcd: kconfig: Remove MIPS_SEAD3 reference Commit 3f5f0a4475e1 ("MIPS: generic: Convert SEAD-3 to a generic board") removed the MIPS_SEAD3 symbol and moved the setting of IMG_ASCII_LCD to the board-sead-3.config defconfig file, but IMG_ASCII_LCD still references the removed MIPS_SEAD3 symbol. Remove the reference. Discovered with the https://github.com/ulfalizer/Kconfiglib/blob/master/examples/list_undefined.py script. Signed-off-by: Ulf Magnusson Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig index 2c2ed9cf8796..3cba78d36eec 100644 --- a/drivers/auxdisplay/Kconfig +++ b/drivers/auxdisplay/Kconfig @@ -137,7 +137,7 @@ config CFAG12864B_RATE config IMG_ASCII_LCD tristate "Imagination Technologies ASCII LCD Display" depends on HAS_IOMEM - default y if MIPS_MALTA || MIPS_SEAD3 + default y if MIPS_MALTA select SYSCON help Enable this to support the simple ASCII LCD displays found on From aa9d87bd6fa2f3c9881c2faacae6185a96cb2dcd Mon Sep 17 00:00:00 2001 From: Corentin Labbe Date: Thu, 18 Jan 2018 21:13:48 +0100 Subject: [PATCH 05/15] auxdisplay: img-ascii-lcd: fix typo on select SYSCON/MFD_SYSCON img-ascii-lcd select un-existing SYSCON kconfig name. This patch fix this error by using the correct MFD_SYSCON kconfig name. Signed-off-by: Corentin Labbe Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig index 3cba78d36eec..a0e771c6ae4b 100644 --- a/drivers/auxdisplay/Kconfig +++ b/drivers/auxdisplay/Kconfig @@ -138,7 +138,7 @@ config IMG_ASCII_LCD tristate "Imagination Technologies ASCII LCD Display" depends on HAS_IOMEM default y if MIPS_MALTA - select SYSCON + select MFD_SYSCON help Enable this to support the simple ASCII LCD displays found on development boards such as the MIPS Boston, MIPS Malta & MIPS SEAD3 From 7223310f4ef3ba8a8b1b34983b565546cd5098ca Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Fri, 7 Jul 2017 20:02:26 -0500 Subject: [PATCH 06/15] auxdisplay: cfag12864bfb: constify fb_fix_screeninfo and fb_var_screeninfo structures These structures are only used to copy into other structures, so declare them as const. This issue was detected using Coccinelle and the following semantic patch: @r disable optional_qualifier@ identifier i; position p; @@ static struct fb_fix_screeninfo i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p @bad@ position p != {r.p,ok.p}; identifier r.i; struct fb_fix_screeninfo e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct fb_fix_screeninfo i = { ... }; The semantic patch for fb_var_screeninfo is analogous. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/cfag12864bfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c index a3874034e2ce..dcbee7e44721 100644 --- a/drivers/auxdisplay/cfag12864bfb.c +++ b/drivers/auxdisplay/cfag12864bfb.c @@ -37,7 +37,7 @@ #define CFAG12864BFB_NAME "cfag12864bfb" -static struct fb_fix_screeninfo cfag12864bfb_fix = { +static const struct fb_fix_screeninfo cfag12864bfb_fix = { .id = "cfag12864b", .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_MONO10, @@ -48,7 +48,7 @@ static struct fb_fix_screeninfo cfag12864bfb_fix = { .accel = FB_ACCEL_NONE, }; -static struct fb_var_screeninfo cfag12864bfb_var = { +static const struct fb_var_screeninfo cfag12864bfb_var = { .xres = CFAG12864B_WIDTH, .yres = CFAG12864B_HEIGHT, .xres_virtual = CFAG12864B_WIDTH, From 54bc937f0cc2a7b9cb9802b9992f936259d015a1 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Mon, 15 Jan 2018 09:43:48 +0000 Subject: [PATCH 07/15] auxdisplay: charlcd: no need to call charlcd_gotoxy() if nothing changes If the line extends beyond the width to the screen, nothing changes. The existing code will call charlcd_gotoxy every time for this case. Signed-off-by: Sean Young Reviewed-by: Geert Uytterhoeven Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/charlcd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 642afd88870b..45ec5ce697c4 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -192,10 +192,11 @@ static void charlcd_print(struct charlcd *lcd, char c) c = lcd->char_conv[(unsigned char)c]; lcd->ops->write_data(lcd, c); priv->addr.x++; + + /* prevents the cursor from wrapping onto the next line */ + if (priv->addr.x == lcd->bwidth) + charlcd_gotoxy(lcd); } - /* prevents the cursor from wrapping onto the next line */ - if (priv->addr.x == lcd->bwidth) - charlcd_gotoxy(lcd); } static void charlcd_clear_fast(struct charlcd *lcd) From 8c483758afe4f1dc34cb8319f36302aa31776ac9 Mon Sep 17 00:00:00 2001 From: Robert Abel Date: Sat, 10 Feb 2018 00:50:11 +0100 Subject: [PATCH 08/15] auxdisplay: charlcd: use null character instead of zero literal to terminate strings Using '\0' instead of plain 0 makes the intent clearer that this is indeed a string and not a series of integers. Signed-off-by: Robert Abel Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/charlcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 45ec5ce697c4..b61cea36add5 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -528,7 +528,7 @@ static void charlcd_write_char(struct charlcd *lcd, char c) if ((c != '\n') && priv->esc_seq.len >= 0) { /* yes, let's add this char to the buffer */ priv->esc_seq.buf[priv->esc_seq.len++] = c; - priv->esc_seq.buf[priv->esc_seq.len] = 0; + priv->esc_seq.buf[priv->esc_seq.len] = '\0'; } else { /* aborts any previous escape sequence */ priv->esc_seq.len = -1; @@ -537,7 +537,7 @@ static void charlcd_write_char(struct charlcd *lcd, char c) case LCD_ESCAPE_CHAR: /* start of an escape sequence */ priv->esc_seq.len = 0; - priv->esc_seq.buf[priv->esc_seq.len] = 0; + priv->esc_seq.buf[priv->esc_seq.len] = '\0'; break; case '\b': /* go back one char and clear it */ From 9629ccca3b82491402ebbed8c03d34d32bb59d58 Mon Sep 17 00:00:00 2001 From: Robert Abel Date: Sat, 10 Feb 2018 00:50:12 +0100 Subject: [PATCH 09/15] auxdisplay: charlcd: replace octal literal with form-feed escape sequence There is no need to resort to octal escape sequence for the form feed character when an established escape sequence exists. Signed-off-by: Robert Abel Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/charlcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index b61cea36add5..ee39d1a85bf7 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -556,7 +556,7 @@ static void charlcd_write_char(struct charlcd *lcd, char c) /* back one char again */ lcd->ops->write_cmd(lcd, LCD_CMD_SHIFT); break; - case '\014': + case '\f': /* quickly clear the display */ charlcd_clear_fast(lcd); break; From 99b9b4909c72e06b46e2fdf083c96b585cb84adb Mon Sep 17 00:00:00 2001 From: Robert Abel Date: Mon, 26 Feb 2018 00:54:29 +0100 Subject: [PATCH 10/15] auxdisplay: charlcd: fix two-line command ^[[LN not marked as processed Signed-off-by: Robert Abel Reviewed-by: Geert Uytterhoeven Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/charlcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index ee39d1a85bf7..0246ff77e772 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -363,6 +363,7 @@ static inline int handle_lcd_special_code(struct charlcd *lcd) break; case 'N': /* Two Lines */ priv->flags |= LCD_FLAG_N; + processed = 1; break; case 'l': /* Shift Cursor Left */ if (priv->addr.x > 0) { From 2e8c04f75731bbd968fa77e94ed856f2dcf53ae6 Mon Sep 17 00:00:00 2001 From: Robert Abel Date: Sat, 10 Feb 2018 00:50:10 +0100 Subject: [PATCH 11/15] auxdisplay: charlcd: fix hex literal ranges for graphics command The graphics command expects 16 hexadecimal literals, but would allow characters in range [0-9a-zA-Z] instead of [0-9a-fA-F]. Signed-off-by: Robert Abel Acked-by: Willy Tarreau Reviewed-by: Geert Uytterhoeven Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/charlcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 0246ff77e772..674ffbae1c65 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -443,9 +443,9 @@ static inline int handle_lcd_special_code(struct charlcd *lcd) shift ^= 4; if (*esc >= '0' && *esc <= '9') { value |= (*esc - '0') << shift; - } else if (*esc >= 'A' && *esc <= 'Z') { + } else if (*esc >= 'A' && *esc <= 'F') { value |= (*esc - 'A' + 10) << shift; - } else if (*esc >= 'a' && *esc <= 'z') { + } else if (*esc >= 'a' && *esc <= 'f') { value |= (*esc - 'a' + 10) << shift; } else { esc++; From b34050fadb86c55d2066ec78a9d05e9809ff5812 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Tue, 27 Feb 2018 23:09:52 +0100 Subject: [PATCH 12/15] auxdisplay: charlcd: Fix and clean up handling of x/y commands The current version is not parsing multiple x/y commands as the code originally intended. On top of that, kstrtoul() expects NULL-terminated strings. Finally, the code does two passes over the string. Some explanations about the supported syntax are added as well. Cc: Willy Tarreau Cc: Geert Uytterhoeven Cc: Andy Shevchenko Cc: Robert Abel Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/charlcd.c | 95 +++++++++++++++++++++++++++++------- 1 file changed, 78 insertions(+), 17 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 674ffbae1c65..e92f3e25f51d 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -293,6 +294,79 @@ static int charlcd_init_display(struct charlcd *lcd) return 0; } +/* + * Parses an unsigned integer from a string, until a non-digit character + * is found. The empty string is not accepted. No overflow checks are done. + * + * Returns whether the parsing was successful. Only in that case + * the output parameters are written to. + * + * TODO: If the kernel adds an inplace version of kstrtoul(), this function + * could be easily replaced by that. + */ +static bool parse_n(const char *s, unsigned long *res, const char **next_s) +{ + if (!isdigit(*s)) + return false; + + *res = 0; + while (isdigit(*s)) { + *res = *res * 10 + (*s - '0'); + ++s; + } + + *next_s = s; + return true; +} + +/* + * Parses a movement command of the form "(.*);", where the group can be + * any number of subcommands of the form "(x|y)[0-9]+". + * + * Returns whether the command is valid. The position arguments are + * only written if the parsing was successful. + * + * For instance: + * - ";" returns (, ). + * - "x1;" returns (1, ). + * - "y2x1;" returns (1, 2). + * - "x12y34x56;" returns (56, 34). + * - "" fails. + * - "x" fails. + * - "x;" fails. + * - "x1" fails. + * - "xy12;" fails. + * - "x12yy12;" fails. + * - "xx" fails. + */ +static bool parse_xy(const char *s, unsigned long *x, unsigned long *y) +{ + unsigned long new_x = *x; + unsigned long new_y = *y; + + for (;;) { + if (!*s) + return false; + + if (*s == ';') + break; + + if (*s == 'x') { + if (!parse_n(s + 1, &new_x, &s)) + return false; + } else if (*s == 'y') { + if (!parse_n(s + 1, &new_y, &s)) + return false; + } else { + return false; + } + } + + *x = new_x; + *y = new_y; + return true; +} + /* * These are the file operation function for user access to /dev/lcd * This function can also be called from inside the kernel, by @@ -471,24 +545,11 @@ static inline int handle_lcd_special_code(struct charlcd *lcd) } case 'x': /* gotoxy : LxXXX[yYYY]; */ case 'y': /* gotoxy : LyYYY[xXXX]; */ - if (!strchr(esc, ';')) - break; + /* If the command is valid, move to the new address */ + if (parse_xy(esc, &priv->addr.x, &priv->addr.y)) + charlcd_gotoxy(lcd); - while (*esc) { - if (*esc == 'x') { - esc++; - if (kstrtoul(esc, 10, &priv->addr.x) < 0) - break; - } else if (*esc == 'y') { - esc++; - if (kstrtoul(esc, 10, &priv->addr.y) < 0) - break; - } else { - break; - } - } - - charlcd_gotoxy(lcd); + /* Regardless of its validity, mark as processed */ processed = 1; break; } From b5b903fba96a4d1771422efd5c713ebb73f7dc82 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 28 Feb 2018 18:33:03 -0800 Subject: [PATCH 13/15] auxdisplay: fix broken menu Having the CHARLCD Kconfig symbol between "menuconfig AUXDISPLAY" and "if AUXDISPLAY" breaks the AUXDISPLAY submenus, so move the CHARLCD Kconfig symbol near the end of the file so that the menu display is continuous. Also include ARM_CHARLCD inside of the if AUXDISPLAY/endif block. Geert says that it should be there. Fixes: 39f8ea46724e ("auxdisplay: charlcd: Extract character LCD core from misc/panel") Cc: stable@vger.kernel.org # v4.12 Cc: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Randy Dunlap Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig index a0e771c6ae4b..836d0f8161a9 100644 --- a/drivers/auxdisplay/Kconfig +++ b/drivers/auxdisplay/Kconfig @@ -14,9 +14,6 @@ menuconfig AUXDISPLAY If you say N, all options in this submenu will be skipped and disabled. -config CHARLCD - tristate "Character LCD core support" if COMPILE_TEST - if AUXDISPLAY config HD44780 @@ -157,8 +154,6 @@ config HT16K33 Say yes here to add support for Holtek HT16K33, RAM mapping 16*8 LED controller driver with keyscan. -endif # AUXDISPLAY - config ARM_CHARLCD bool "ARM Ltd. Character LCD Driver" depends on PLAT_VERSATILE @@ -169,6 +164,8 @@ config ARM_CHARLCD line and the Linux version on the second line, but that's still useful. +endif # AUXDISPLAY + config PANEL tristate "Parallel port LCD/Keypad Panel support" depends on PARPORT @@ -448,3 +445,6 @@ config PANEL_BOOT_MESSAGE printf()-formatted message is valid with newline and escape codes. endif # PANEL + +config CHARLCD + tristate "Character LCD core support" if COMPILE_TEST From 8e2c3f17f2c29209f4fe670ff5343a01e7fe5a96 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 28 Feb 2018 18:33:20 -0800 Subject: [PATCH 14/15] auxdisplay: make PANEL a menuconfig This change makes xconfig present the PANEL drivers immediately following the AUXDISPLAY drivers instead of under the major menu item "Device Drivers". It also unclutters the Device Drivers menu in nconfig and menuconfig by moving the PANEL drivers to a sub-menu. Signed-off-by: Randy Dunlap Acked-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig index 836d0f8161a9..57410f9c5d44 100644 --- a/drivers/auxdisplay/Kconfig +++ b/drivers/auxdisplay/Kconfig @@ -166,7 +166,7 @@ config ARM_CHARLCD endif # AUXDISPLAY -config PANEL +menuconfig PANEL tristate "Parallel port LCD/Keypad Panel support" depends on PARPORT select CHARLCD From 351f683b9823a3d1bffb6e2e3f381601aa0b2671 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Sat, 17 Feb 2018 20:33:13 +0100 Subject: [PATCH 15/15] auxdisplay: Replace licenses with SPDX identifiers Cc: Philippe Ombredanne Acked-by: Willy Tarreau Acked-by: Linus Walleij Acked-by: Robin van der Gracht Acked-by: Geert Uytterhoeven Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/arm-charlcd.c | 2 +- drivers/auxdisplay/cfag12864b.c | 16 +--------------- drivers/auxdisplay/cfag12864bfb.c | 16 +--------------- drivers/auxdisplay/charlcd.c | 6 +----- drivers/auxdisplay/hd44780.c | 6 +----- drivers/auxdisplay/ht16k33.c | 10 +--------- drivers/auxdisplay/ks0108.c | 16 +--------------- drivers/auxdisplay/panel.c | 6 +----- include/linux/cfag12864b.h | 16 +--------------- include/linux/ks0108.h | 16 +--------------- samples/auxdisplay/cfag12864b-example.c | 16 +--------------- 11 files changed, 11 insertions(+), 115 deletions(-) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c index dde180995582..296fb30dfa00 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -1,10 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Driver for the on-board character LCD found on some ARM reference boards * This is basically an Hitachi HD44780 LCD with a custom IP block to drive it * http://en.wikipedia.org/wiki/HD44780_Character_LCD * Currently it will just display the text "ARM Linux" and the linux version * - * License terms: GNU General Public License (GPL) version 2 * Author: Linus Walleij */ #include diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c index 41ce4bd96813..6bd2f65e116a 100644 --- a/drivers/auxdisplay/cfag12864b.c +++ b/drivers/auxdisplay/cfag12864b.c @@ -1,26 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Filename: cfag12864b.c * Version: 0.1.0 * Description: cfag12864b LCD driver - * License: GPLv2 * Depends: ks0108 * * Author: Copyright (C) Miguel Ojeda Sandonis * Date: 2006-10-31 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c index dcbee7e44721..40c8a552a478 100644 --- a/drivers/auxdisplay/cfag12864bfb.c +++ b/drivers/auxdisplay/cfag12864bfb.c @@ -1,26 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Filename: cfag12864bfb.c * Version: 0.1.0 * Description: cfag12864b LCD framebuffer driver - * License: GPLv2 * Depends: cfag12864b * * Author: Copyright (C) Miguel Ojeda Sandonis * Date: 2006-10-31 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index e92f3e25f51d..8673fc2b9eb8 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -1,13 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Character LCD driver for Linux * * Copyright (C) 2000-2008, Willy Tarreau * Copyright (C) 2016-2017 Glider bvba - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. */ #include diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c index 036eec404289..78d8f1986fec 100644 --- a/drivers/auxdisplay/hd44780.c +++ b/drivers/auxdisplay/hd44780.c @@ -1,13 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * HD44780 Character LCD driver for Linux * * Copyright (C) 2000-2008, Willy Tarreau * Copyright (C) 2016-2017 Glider bvba - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. */ #include diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c index fbfa5b4cc567..a43276c76fc6 100644 --- a/drivers/auxdisplay/ht16k33.c +++ b/drivers/auxdisplay/ht16k33.c @@ -1,18 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 /* * HT16K33 driver * * Author: Robin van der Gracht * * Copyright: (C) 2016 Protonic Holland. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. */ #include diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c index 816de9eaac26..abfe3fa9e6f4 100644 --- a/drivers/auxdisplay/ks0108.c +++ b/drivers/auxdisplay/ks0108.c @@ -1,26 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Filename: ks0108.c * Version: 0.1.0 * Description: ks0108 LCD Controller driver - * License: GPLv2 * Depends: parport * * Author: Copyright (C) Miguel Ojeda Sandonis * Date: 2006-10-31 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c index ec5e8800f8ad..3b25a643058c 100644 --- a/drivers/auxdisplay/panel.c +++ b/drivers/auxdisplay/panel.c @@ -1,13 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Front panel driver for Linux * Copyright (C) 2000-2008, Willy Tarreau * Copyright (C) 2016-2017 Glider bvba * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * * This code drives an LCD module (/dev/lcd), and a keypad (/dev/keypad) * connected to a parallel printer port. * diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h index b454dfce60d9..4060004968c8 100644 --- a/include/linux/cfag12864b.h +++ b/include/linux/cfag12864b.h @@ -1,25 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Filename: cfag12864b.h * Version: 0.1.0 * Description: cfag12864b LCD driver header - * License: GPLv2 * * Author: Copyright (C) Miguel Ojeda Sandonis * Date: 2006-10-12 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _CFAG12864B_H_ diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h index cb311798e0bc..0738389b42b6 100644 --- a/include/linux/ks0108.h +++ b/include/linux/ks0108.h @@ -1,25 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Filename: ks0108.h * Version: 0.1.0 * Description: ks0108 LCD Controller driver header - * License: GPLv2 * * Author: Copyright (C) Miguel Ojeda Sandonis * Date: 2006-10-31 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _KS0108_H_ diff --git a/samples/auxdisplay/cfag12864b-example.c b/samples/auxdisplay/cfag12864b-example.c index e7823ffb1ca0..85571e90191f 100644 --- a/samples/auxdisplay/cfag12864b-example.c +++ b/samples/auxdisplay/cfag12864b-example.c @@ -1,25 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Filename: cfag12864b-example.c * Version: 0.1.0 * Description: cfag12864b LCD userspace example program - * License: GPLv2 * * Author: Copyright (C) Miguel Ojeda Sandonis * Date: 2006-10-31 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /*