mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 05:26:07 +00:00
3fc04dd7eb
Move struct charlcd member ifwidth to our new struct hd44780_common. ifwidth is hd44780 device specific and is used by two drivers at the moment, so we move it to a common place, where both can use this. Reviewed-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
23 lines
437 B
C
23 lines
437 B
C
// 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;
|
|
|
|
hd->ifwidth = 8;
|
|
hd->bwidth = DEFAULT_LCD_BWIDTH;
|
|
hd->hwidth = DEFAULT_LCD_HWIDTH;
|
|
return hd;
|
|
}
|
|
EXPORT_SYMBOL_GPL(hd44780_common_alloc);
|
|
|
|
MODULE_LICENSE("GPL");
|