Skip to content

Commit

Permalink
Merge tag 'auxdisplay-for-v6.11-tag1' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Jul 26, 2024
2 parents eb966e0 + 2ccfe94 commit 2f8c4f5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/auxdisplay/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/auxdisplay/arm-charlcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions drivers/auxdisplay/charlcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion drivers/auxdisplay/hd44780.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions drivers/auxdisplay/hd44780_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
1 change: 1 addition & 0 deletions drivers/auxdisplay/ht16k33.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
11 changes: 10 additions & 1 deletion drivers/auxdisplay/line-display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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");

0 comments on commit 2f8c4f5

Please sign in to comment.