diff options
author | Lars Poeschel <poeschel@lemonage.de> | 2020-11-03 12:58:05 +0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2020-11-04 13:04:02 +0300 |
commit | 718e05ed92ecac0d9d3954bcc8064527c3ce7565 (patch) | |
tree | e724e59f1c8e189aa82ef9585a10c412f4e13007 /drivers/auxdisplay/hd44780_common.c | |
parent | 66ce7d5c1e124b497f45aead50df1dc3c2873382 (diff) | |
download | linux-718e05ed92ecac0d9d3954bcc8064527c3ce7565.tar.xz |
auxdisplay: Introduce hd44780_common.[ch]
There is some hd44780 specific code in charlcd and this code is used by
multiple drivers. To make charlcd independent from this device specific
code this has to be moved to a place where the multiple drivers can
share their common code. This common place is now introduced as
hd44780_common.
Reviewed-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'drivers/auxdisplay/hd44780_common.c')
-rw-r--r-- | drivers/auxdisplay/hd44780_common.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/auxdisplay/hd44780_common.c b/drivers/auxdisplay/hd44780_common.c new file mode 100644 index 000000000000..2fdea29d6a8f --- /dev/null +++ b/drivers/auxdisplay/hd44780_common.c @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#include <linux/module.h> +#include <linux/slab.h> + +#include "hd44780_common.h" + +struct hd44780_common *hd44780_common_alloc(void) +{ + struct hd44780_common *hd; + + hd = kzalloc(sizeof(*hd), GFP_KERNEL); + if (!hd) + return NULL; + + return hd; +} +EXPORT_SYMBOL_GPL(hd44780_common_alloc); + +MODULE_LICENSE("GPL"); |