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: Geert Uytterhoeven <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
This commit is contained in:
Andy Shevchenko 2019-03-12 16:44:30 +02:00 • committed by Miguel Ojeda
commit 8e44fc8506
2 changed files with 7 additions and 0 deletions

View file

@ -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)
{