auxdisplay updates for v6.11

- Add support for configuring the boot message on line displays,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iIsEABYIADMWIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZqIOyhUcZ2VlcnRAbGlu
 dXgtbTY4ay5vcmcACgkQisJQ/WRJ8XAIbwD+K+kLRqVtnjh8hIKPnRxXWSXnKzwb
 yuRYjzEUBrb0rDgBAOW+wNp0x7f+m7uu2U2EW/W4B7eNJDvGB74VLZxiMLQD
 =3MOW
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2024-07-26 11:04:28 -07:00
commit 2f8c4f5062
7 changed files with 17 additions and 4 deletions

View File

@ -316,7 +316,7 @@ endif # PARPORT_PANEL
config PANEL_CHANGE_MESSAGE
bool "Change LCD initialization message ?"
depends on CHARLCD
depends on CHARLCD || LINEDISP
help
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

View File

@ -270,7 +270,7 @@ static int __init charlcd_probe(struct platform_device *pdev)
struct charlcd *lcd;
struct resource *res;
lcd = kzalloc(sizeof(struct charlcd), GFP_KERNEL);
lcd = kzalloc(sizeof(*lcd), GFP_KERNEL);
if (!lcd)
return -ENOMEM;

View File

@ -36,6 +36,8 @@ enum charlcd_lines {
CHARLCD_LINES_2,
};
struct charlcd_ops;
struct charlcd {
const struct charlcd_ops *ops;
const unsigned char *char_conv; /* Optional */

View File

@ -230,7 +230,7 @@ static int hd44780_probe(struct platform_device *pdev)
if (!lcd)
goto fail1;
hd = kzalloc(sizeof(struct hd44780), GFP_KERNEL);
hd = kzalloc(sizeof(*hd), GFP_KERNEL);
if (!hd)
goto fail2;

View File

@ -366,4 +366,5 @@ struct hd44780_common *hd44780_common_alloc(void)
}
EXPORT_SYMBOL_GPL(hd44780_common_alloc);
MODULE_DESCRIPTION("Common functions for HD44780 (and compatibles) LCD displays");
MODULE_LICENSE("GPL");

View File

@ -483,6 +483,7 @@ static int ht16k33_led_probe(struct device *dev, struct led_classdev *led,
led->max_brightness = MAX_BRIGHTNESS;
err = devm_led_classdev_register_ext(dev, led, &init_data);
fwnode_handle_put(init_data.fwnode);
if (err)
dev_err(dev, "Failed to register LED\n");

View File

@ -8,7 +8,9 @@
* Copyright (C) 2021 Glider bv
*/
#ifndef CONFIG_PANEL_BOOT_MESSAGE
#include <generated/utsrelease.h>
#endif
#include <linux/container_of.h>
#include <linux/device.h>
@ -312,6 +314,12 @@ static int linedisp_init_map(struct linedisp *linedisp)
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: pointer to character line display structure
@ -359,7 +367,7 @@ int linedisp_register(struct linedisp *linedisp, struct device *parent,
goto out_del_timer;
/* display a default message */
err = linedisp_display(linedisp, "Linux " UTS_RELEASE " ", -1);
err = linedisp_display(linedisp, LINEDISP_INIT_TEXT, -1);
if (err)
goto out_del_dev;
@ -388,4 +396,5 @@ void linedisp_unregister(struct linedisp *linedisp)
}
EXPORT_SYMBOL_NS_GPL(linedisp_unregister, LINEDISP);
MODULE_DESCRIPTION("Character line display core support");
MODULE_LICENSE("GPL");