[PATCH v1 3/7] auxdisplay: hd44780: Introduce hd44780_common_free()

Andy Shevchenko posted 7 patches 9 months, 3 weeks ago
[PATCH v1 3/7] auxdisplay: hd44780: Introduce hd44780_common_free()
Posted by Andy Shevchenko 9 months, 3 weeks ago
Introduce hd44780_common_free() for symmetrical operation
to hd44780_common_alloc(). It will allow to modify the both
in the future without touching the users.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/auxdisplay/hd44780_common.c | 6 ++++++
 drivers/auxdisplay/hd44780_common.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/auxdisplay/hd44780_common.c b/drivers/auxdisplay/hd44780_common.c
index 4ef87c3118c0..3f8a496ccb8e 100644
--- a/drivers/auxdisplay/hd44780_common.c
+++ b/drivers/auxdisplay/hd44780_common.c
@@ -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");
diff --git a/drivers/auxdisplay/hd44780_common.h b/drivers/auxdisplay/hd44780_common.h
index a16aa8c29c99..fe1386e3cf79 100644
--- a/drivers/auxdisplay/hd44780_common.h
+++ b/drivers/auxdisplay/hd44780_common.h
@@ -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);
-- 
2.45.1.3035.g276e886db78b
Re: [PATCH v1 3/7] auxdisplay: hd44780: Introduce hd44780_common_free()
Posted by Geert Uytterhoeven 9 months, 2 weeks ago
Hi Andy,

Thanks for your patch!

On Mon, 24 Feb 2025 at 18:30, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Introduce hd44780_common_free() for symmetrical operation
> to hd44780_common_alloc(). It will allow to modify the both

s/the both/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>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds