[PATCH v1 5/7] auxdisplay: panel: Make use of hd44780_common_free()

Andy Shevchenko posted 7 patches 9 months, 3 weeks ago
[PATCH v1 5/7] auxdisplay: panel: Make use of hd44780_common_free()
Posted by Andy Shevchenko 9 months, 3 weeks ago
Use the symmetrical API to free the common resources.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/auxdisplay/panel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index 4da142692d55..aa1d03fef22e 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -837,7 +837,7 @@ static void lcd_init(void)
 
 	charlcd = charlcd_alloc(0);
 	if (!charlcd) {
-		kfree(hdc);
+		hd44780_common_free(hdc);
 		return;
 	}
 
@@ -1691,7 +1691,7 @@ static void panel_detach(struct parport *port)
 	if (lcd.enabled) {
 		charlcd_unregister(lcd.charlcd);
 		lcd.initialized = false;
-		kfree(lcd.charlcd->drvdata);
+		hd44780_common_free(lcd.charlcd->drvdata);
 		charlcd_free(lcd.charlcd);
 		lcd.charlcd = NULL;
 	}
-- 
2.45.1.3035.g276e886db78b
Re: [PATCH v1 5/7] auxdisplay: panel: Make use of hd44780_common_free()
Posted by Geert Uytterhoeven 9 months, 2 weeks ago
Hi Andy,

On Mon, 24 Feb 2025 at 18:30, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Use the symmetrical API to free the common resources.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Perhaps fold this into [PATCH v1 3/7]?

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
Re: [PATCH v1 5/7] auxdisplay: panel: Make use of hd44780_common_free()
Posted by Andy Shevchenko 9 months, 2 weeks ago
On Fri, Mar 07, 2025 at 10:05:56AM +0100, Geert Uytterhoeven wrote:
> On Mon, 24 Feb 2025 at 18:30, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > Use the symmetrical API to free the common resources.
> 
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Thanks!

> Perhaps fold this into [PATCH v1 3/7]?

Since we are changing not only hd44780 parts, I made the split.
But if you are insisting I may fold them.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v1 5/7] auxdisplay: panel: Make use of hd44780_common_free()
Posted by Geert Uytterhoeven 9 months, 2 weeks ago
Hi Andy,

On Fri, 7 Mar 2025 at 18:02, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Fri, Mar 07, 2025 at 10:05:56AM +0100, Geert Uytterhoeven wrote:
> > On Mon, 24 Feb 2025 at 18:30, Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > Use the symmetrical API to free the common resources.
> >
> > Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
>
> Thanks!
>
> > Perhaps fold this into [PATCH v1 3/7]?
>
> Since we are changing not only hd44780 parts, I made the split.
> But if you are insisting I may fold them.

Up to you, you are the M ;-)

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