Skip to content

Commit 2f8c4f5

Browse files
committed
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
2 parents eb966e0 + 2ccfe94 commit 2f8c4f5

File tree

7 files changed

+17
-4
lines changed

7 files changed

+17
-4
lines changed

drivers/auxdisplay/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ endif # PARPORT_PANEL
316316

317317
config PANEL_CHANGE_MESSAGE
318318
bool "Change LCD initialization message ?"
319-
depends on CHARLCD
319+
depends on CHARLCD || LINEDISP
320320
help
321321
This allows you to replace the boot message indicating the kernel version
322322
and the driver version with a custom message. This is useful on appliances

drivers/auxdisplay/arm-charlcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static int __init charlcd_probe(struct platform_device *pdev)
270270
struct charlcd *lcd;
271271
struct resource *res;
272272

273-
lcd = kzalloc(sizeof(struct charlcd), GFP_KERNEL);
273+
lcd = kzalloc(sizeof(*lcd), GFP_KERNEL);
274274
if (!lcd)
275275
return -ENOMEM;
276276

drivers/auxdisplay/charlcd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ enum charlcd_lines {
3636
CHARLCD_LINES_2,
3737
};
3838

39+
struct charlcd_ops;
40+
3941
struct charlcd {
4042
const struct charlcd_ops *ops;
4143
const unsigned char *char_conv; /* Optional */

drivers/auxdisplay/hd44780.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static int hd44780_probe(struct platform_device *pdev)
230230
if (!lcd)
231231
goto fail1;
232232

233-
hd = kzalloc(sizeof(struct hd44780), GFP_KERNEL);
233+
hd = kzalloc(sizeof(*hd), GFP_KERNEL);
234234
if (!hd)
235235
goto fail2;
236236

drivers/auxdisplay/hd44780_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,4 +366,5 @@ struct hd44780_common *hd44780_common_alloc(void)
366366
}
367367
EXPORT_SYMBOL_GPL(hd44780_common_alloc);
368368

369+
MODULE_DESCRIPTION("Common functions for HD44780 (and compatibles) LCD displays");
369370
MODULE_LICENSE("GPL");

drivers/auxdisplay/ht16k33.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ static int ht16k33_led_probe(struct device *dev, struct led_classdev *led,
483483
led->max_brightness = MAX_BRIGHTNESS;
484484

485485
err = devm_led_classdev_register_ext(dev, led, &init_data);
486+
fwnode_handle_put(init_data.fwnode);
486487
if (err)
487488
dev_err(dev, "Failed to register LED\n");
488489

drivers/auxdisplay/line-display.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
* Copyright (C) 2021 Glider bv
99
*/
1010

11+
#ifndef CONFIG_PANEL_BOOT_MESSAGE
1112
#include <generated/utsrelease.h>
13+
#endif
1214

1315
#include <linux/container_of.h>
1416
#include <linux/device.h>
@@ -312,6 +314,12 @@ static int linedisp_init_map(struct linedisp *linedisp)
312314
return 0;
313315
}
314316

317+
#ifdef CONFIG_PANEL_BOOT_MESSAGE
318+
#define LINEDISP_INIT_TEXT CONFIG_PANEL_BOOT_MESSAGE
319+
#else
320+
#define LINEDISP_INIT_TEXT "Linux " UTS_RELEASE " "
321+
#endif
322+
315323
/**
316324
* linedisp_register - register a character line display
317325
* @linedisp: pointer to character line display structure
@@ -359,7 +367,7 @@ int linedisp_register(struct linedisp *linedisp, struct device *parent,
359367
goto out_del_timer;
360368

361369
/* display a default message */
362-
err = linedisp_display(linedisp, "Linux " UTS_RELEASE " ", -1);
370+
err = linedisp_display(linedisp, LINEDISP_INIT_TEXT, -1);
363371
if (err)
364372
goto out_del_dev;
365373

@@ -388,4 +396,5 @@ void linedisp_unregister(struct linedisp *linedisp)
388396
}
389397
EXPORT_SYMBOL_NS_GPL(linedisp_unregister, LINEDISP);
390398

399+
MODULE_DESCRIPTION("Character line display core support");
391400
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)