Skip to content

Commit d5c7c27

Browse files
committed
auxdisplay: hd44780: Introduce hd44780_common_free()
Introduce hd44780_common_free() for symmetrical operation to hd44780_common_alloc(). It will allow to modify both in the future without touching the users. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
1 parent 68917df commit d5c7c27

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

drivers/auxdisplay/hd44780_common.c

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

369+
void hd44780_common_free(struct hd44780_common *hd)
370+
{
371+
kfree(hd);
372+
}
373+
EXPORT_SYMBOL_GPL(hd44780_common_free);
374+
369375
MODULE_DESCRIPTION("Common functions for HD44780 (and compatibles) LCD displays");
370376
MODULE_LICENSE("GPL");

drivers/auxdisplay/hd44780_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ int hd44780_common_blink(struct charlcd *lcd, enum charlcd_onoff on);
3030
int hd44780_common_fontsize(struct charlcd *lcd, enum charlcd_fontsize size);
3131
int hd44780_common_lines(struct charlcd *lcd, enum charlcd_lines lines);
3232
int hd44780_common_redefine_char(struct charlcd *lcd, char *esc);
33+
3334
struct hd44780_common *hd44780_common_alloc(void);
35+
void hd44780_common_free(struct hd44780_common *hd);

0 commit comments

Comments
 (0)