Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <geert+renesas@glider.be>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>

authored by

Andy Shevchenko and committed by
Miguel Ojeda
8e44fc85 b658a211

+7
+6
drivers/auxdisplay/charlcd.c
··· 818 818 } 819 819 EXPORT_SYMBOL_GPL(charlcd_alloc); 820 820 821 + void charlcd_free(struct charlcd *lcd) 822 + { 823 + kfree(charlcd_to_priv(lcd)); 824 + } 825 + EXPORT_SYMBOL_GPL(charlcd_free); 826 + 821 827 static int panel_notify_sys(struct notifier_block *this, unsigned long code, 822 828 void *unused) 823 829 {
+1
include/misc/charlcd.h
··· 35 35 }; 36 36 37 37 struct charlcd *charlcd_alloc(unsigned int drvdata_size); 38 + void charlcd_free(struct charlcd *lcd); 38 39 39 40 int charlcd_register(struct charlcd *lcd); 40 41 int charlcd_unregister(struct charlcd *lcd);