]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
auxdisplay: hd44780: Introduce hd44780_common_free()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 24 Feb 2025 17:27:40 +0000 (19:27 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 10 Mar 2025 16:03:02 +0000 (18:03 +0200)
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>
drivers/auxdisplay/hd44780_common.c
drivers/auxdisplay/hd44780_common.h

index 4ef87c3118c0902b00859cbb114634134fa47394..3f8a496ccb8e6db6e30b1867a301e618f015bc99 100644 (file)
@@ -366,5 +366,11 @@ struct hd44780_common *hd44780_common_alloc(void)
 }
 EXPORT_SYMBOL_GPL(hd44780_common_alloc);
 
+void hd44780_common_free(struct hd44780_common *hd)
+{
+       kfree(hd);
+}
+EXPORT_SYMBOL_GPL(hd44780_common_free);
+
 MODULE_DESCRIPTION("Common functions for HD44780 (and compatibles) LCD displays");
 MODULE_LICENSE("GPL");
index a16aa8c29c992048fb1103b6e55e1248b13b965a..fe1386e3cf7973004162117d8129f6951a5b66b1 100644 (file)
@@ -30,4 +30,6 @@ int hd44780_common_blink(struct charlcd *lcd, enum charlcd_onoff on);
 int hd44780_common_fontsize(struct charlcd *lcd, enum charlcd_fontsize size);
 int hd44780_common_lines(struct charlcd *lcd, enum charlcd_lines lines);
 int hd44780_common_redefine_char(struct charlcd *lcd, char *esc);
+
 struct hd44780_common *hd44780_common_alloc(void);
+void hd44780_common_free(struct hd44780_common *hd);