Commit 2f8c4f50 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'auxdisplay-for-v6.11-tag1' of...

Merge tag 'auxdisplay-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull auxdisplay updates from Geert Uytterhoeven:

  - add support for configuring the boot message on line displays

  - miscellaneous fixes and improvements

* tag 'auxdisplay-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  auxdisplay: ht16k33: Drop reference after LED registration
  auxdisplay: Use sizeof(*pointer) instead of sizeof(type)
  auxdisplay: hd44780: add missing MODULE_DESCRIPTION() macro
  auxdisplay: linedisp: add missing MODULE_DESCRIPTION() macro
  auxdisplay: linedisp: Support configuring the boot message
  auxdisplay: charlcd: Provide a forward declaration
parents eb966e0c 2ccfe94b
...@@ -316,7 +316,7 @@ endif # PARPORT_PANEL ...@@ -316,7 +316,7 @@ endif # PARPORT_PANEL
config PANEL_CHANGE_MESSAGE config PANEL_CHANGE_MESSAGE
bool "Change LCD initialization message ?" bool "Change LCD initialization message ?"
depends on CHARLCD depends on CHARLCD || LINEDISP
help help
This allows you to replace the boot message indicating the kernel version This allows you to replace the boot message indicating the kernel version
and the driver version with a custom message. This is useful on appliances and the driver version with a custom message. This is useful on appliances
......
...@@ -270,7 +270,7 @@ static int __init charlcd_probe(struct platform_device *pdev) ...@@ -270,7 +270,7 @@ static int __init charlcd_probe(struct platform_device *pdev)
struct charlcd *lcd; struct charlcd *lcd;
struct resource *res; struct resource *res;
lcd = kzalloc(sizeof(struct charlcd), GFP_KERNEL); lcd = kzalloc(sizeof(*lcd), GFP_KERNEL);
if (!lcd) if (!lcd)
return -ENOMEM; return -ENOMEM;
......
...@@ -36,6 +36,8 @@ enum charlcd_lines { ...@@ -36,6 +36,8 @@ enum charlcd_lines {
CHARLCD_LINES_2, CHARLCD_LINES_2,
}; };
struct charlcd_ops;
struct charlcd { struct charlcd {
const struct charlcd_ops *ops; const struct charlcd_ops *ops;
const unsigned char *char_conv; /* Optional */ const unsigned char *char_conv; /* Optional */
......
...@@ -230,7 +230,7 @@ static int hd44780_probe(struct platform_device *pdev) ...@@ -230,7 +230,7 @@ static int hd44780_probe(struct platform_device *pdev)
if (!lcd) if (!lcd)
goto fail1; goto fail1;
hd = kzalloc(sizeof(struct hd44780), GFP_KERNEL); hd = kzalloc(sizeof(*hd), GFP_KERNEL);
if (!hd) if (!hd)
goto fail2; goto fail2;
......
...@@ -366,4 +366,5 @@ struct hd44780_common *hd44780_common_alloc(void) ...@@ -366,4 +366,5 @@ struct hd44780_common *hd44780_common_alloc(void)
} }
EXPORT_SYMBOL_GPL(hd44780_common_alloc); EXPORT_SYMBOL_GPL(hd44780_common_alloc);
MODULE_DESCRIPTION("Common functions for HD44780 (and compatibles) LCD displays");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -483,6 +483,7 @@ static int ht16k33_led_probe(struct device *dev, struct led_classdev *led, ...@@ -483,6 +483,7 @@ static int ht16k33_led_probe(struct device *dev, struct led_classdev *led,
led->max_brightness = MAX_BRIGHTNESS; led->max_brightness = MAX_BRIGHTNESS;
err = devm_led_classdev_register_ext(dev, led, &init_data); err = devm_led_classdev_register_ext(dev, led, &init_data);
fwnode_handle_put(init_data.fwnode);
if (err) if (err)
dev_err(dev, "Failed to register LED\n"); dev_err(dev, "Failed to register LED\n");
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
* Copyright (C) 2021 Glider bv * Copyright (C) 2021 Glider bv
*/ */
#ifndef CONFIG_PANEL_BOOT_MESSAGE
#include <generated/utsrelease.h> #include <generated/utsrelease.h>
#endif
#include <linux/container_of.h> #include <linux/container_of.h>
#include <linux/device.h> #include <linux/device.h>
...@@ -312,6 +314,12 @@ static int linedisp_init_map(struct linedisp *linedisp) ...@@ -312,6 +314,12 @@ static int linedisp_init_map(struct linedisp *linedisp)
return 0; return 0;
} }
#ifdef CONFIG_PANEL_BOOT_MESSAGE
#define LINEDISP_INIT_TEXT CONFIG_PANEL_BOOT_MESSAGE
#else
#define LINEDISP_INIT_TEXT "Linux " UTS_RELEASE " "
#endif
/** /**
* linedisp_register - register a character line display * linedisp_register - register a character line display
* @linedisp: pointer to character line display structure * @linedisp: pointer to character line display structure
...@@ -359,7 +367,7 @@ int linedisp_register(struct linedisp *linedisp, struct device *parent, ...@@ -359,7 +367,7 @@ int linedisp_register(struct linedisp *linedisp, struct device *parent,
goto out_del_timer; goto out_del_timer;
/* display a default message */ /* display a default message */
err = linedisp_display(linedisp, "Linux " UTS_RELEASE " ", -1); err = linedisp_display(linedisp, LINEDISP_INIT_TEXT, -1);
if (err) if (err)
goto out_del_dev; goto out_del_dev;
...@@ -388,4 +396,5 @@ void linedisp_unregister(struct linedisp *linedisp) ...@@ -388,4 +396,5 @@ void linedisp_unregister(struct linedisp *linedisp)
} }
EXPORT_SYMBOL_NS_GPL(linedisp_unregister, LINEDISP); EXPORT_SYMBOL_NS_GPL(linedisp_unregister, LINEDISP);
MODULE_DESCRIPTION("Character line display core support");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment