Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e44fc85 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Miguel Ojeda
Browse files

auxdisplay: charlcd: Introduce charlcd_free() helper



The charlcd_free() is a counterpart to charlcd_alloc()
and should be called symmetrically on tear down.

Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
parent b658a211
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -818,6 +818,12 @@ struct charlcd *charlcd_alloc(unsigned int drvdata_size)
}
EXPORT_SYMBOL_GPL(charlcd_alloc);

void charlcd_free(struct charlcd *lcd)
{
	kfree(charlcd_to_priv(lcd));
}
EXPORT_SYMBOL_GPL(charlcd_free);

static int panel_notify_sys(struct notifier_block *this, unsigned long code,
			    void *unused)
{
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ struct charlcd_ops {
};

struct charlcd *charlcd_alloc(unsigned int drvdata_size);
void charlcd_free(struct charlcd *lcd);

int charlcd_register(struct charlcd *lcd);
int charlcd_unregister(struct charlcd *lcd);