diff options
author | Peilin Ye <yepeilin.cs@gmail.com> | 2020-09-24 09:40:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-14 10:31:21 +0200 |
commit | 7b9eaa7241ea2cfa580b854d461be72107a4b35c (patch) | |
tree | 33e59b4f969b2cd3951c504eff007ad9aaf4f734 /include/linux/font.h | |
parent | a1b977b49b66c75e6c51a515f6700371ae720217 (diff) | |
download | linux-stable-7b9eaa7241ea2cfa580b854d461be72107a4b35c.tar.gz linux-stable-7b9eaa7241ea2cfa580b854d461be72107a4b35c.tar.bz2 linux-stable-7b9eaa7241ea2cfa580b854d461be72107a4b35c.zip |
fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h
commit bb0890b4cd7f8203e3aa99c6d0f062d6acdaad27 upstream.
drivers/video/console/newport_con.c is borrowing FONT_EXTRA_WORDS macros
from drivers/video/fbdev/core/fbcon.h. To keep things simple, move all
definitions into <linux/font.h>.
Since newport_con now uses four extra words, initialize the fourth word in
newport_set_font() properly.
Cc: stable@vger.kernel.org
Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/7fb8bc9b0abc676ada6b7ac0e0bd443499357267.1600953813.git.yepeilin.cs@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/font.h')
-rw-r--r-- | include/linux/font.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/font.h b/include/linux/font.h index d6821769dd1e..0a3639a00b3a 100644 --- a/include/linux/font.h +++ b/include/linux/font.h @@ -57,4 +57,12 @@ extern const struct font_desc *get_default_font(int xres, int yres, /* Max. length for the name of a predefined font */ #define MAX_FONT_NAME 32 +/* Extra word getters */ +#define REFCOUNT(fd) (((int *)(fd))[-1]) +#define FNTSIZE(fd) (((int *)(fd))[-2]) +#define FNTCHARCNT(fd) (((int *)(fd))[-3]) +#define FNTSUM(fd) (((int *)(fd))[-4]) + +#define FONT_EXTRA_WORDS 4 + #endif /* _VIDEO_FONT_H */ |