summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-11-13 09:13:12 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-11-13 09:14:48 +0100
commit314b5402d9f90e4be4be2bbe7c0072876f70281c (patch)
tree5e8623d40257191df7b6f9e7467e15ab067d1338 /include
parent3eeac4d2abf64452e0aec723704f1566e020a60e (diff)
downloadbarebox-314b5402d9f90e4be4be2bbe7c0072876f70281c.tar.gz
barebox-314b5402d9f90e4be4be2bbe7c0072876f70281c.tar.xz
fbconsole: register fonts dynamically
Instead of having a fixed array of fonts register the fonts dynamically. This allows easier adding of fonts to the tree since only one file per font has to be added and no other files modified. Currently we have to register the fonts very early before the first framebuffer is registered. This is because of our limited dev_add_param_enum() which wants to know the number of elements when called, so we can't add elements once after we've called dev_add_param_enum(). Maybe a dev_add_param_array() has to be created whithout this limitation, but that's left for a future exercise. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/font.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/font.h b/include/linux/font.h
index 62b1879da6..f8b0e94787 100644
--- a/include/linux/font.h
+++ b/include/linux/font.h
@@ -17,12 +17,9 @@ struct font_desc {
const char *name;
int width, height;
const void *data;
+ struct list_head list;
};
-extern const struct font_desc font_vga_8x16,
- font_7x14,
- font_mini_4x6;
-
/* Max. length for the name of a predefined font */
#define MAX_FONT_NAME 32
@@ -32,4 +29,6 @@ extern struct param_d *add_param_font(struct device_d *dev,
int (*get)(struct param_d *p, void *priv),
int *value, void *priv);
+int font_register(struct font_desc *font);
+
#endif /* _VIDEO_FONT_H */