[PATCH 3/4] linux/font.h: Stub out font functions
Andrey Smirnov
andrew.smirnov at gmail.com
Mon Feb 5 09:29:34 PST 2018
Stub out font-related funtions functions so as to avoid having to
ifdef the code using them.
Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
include/linux/font.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/include/linux/font.h b/include/linux/font.h
index feeab9719..9b3699ba8 100644
--- a/include/linux/font.h
+++ b/include/linux/font.h
@@ -30,6 +30,8 @@ struct font_desc {
/* Max. length for the name of a predefined font */
#define MAX_FONT_NAME 32
+#ifdef CONFIG_FONTS
+
extern int find_font_index(const struct font_desc *font, int ch);
extern const struct font_desc *find_font_enum(int n);
extern struct param_d *add_param_font(struct device_d *dev,
@@ -39,4 +41,32 @@ extern struct param_d *add_param_font(struct device_d *dev,
int font_register(struct font_desc *font);
+#else
+
+static inline int find_font_index(const struct font_desc *font, int ch)
+{
+ return -ENOTSUPP;
+}
+
+static inline const struct font_desc *find_font_enum(int n)
+{
+ return NULL;
+}
+
+static inline struct param_d *
+add_param_font(struct device_d *dev,
+ int (*set)(struct param_d *p, void *priv),
+ int (*get)(struct param_d *p, void *priv),
+ int *value, void *priv)
+{
+ return NULL;
+}
+
+static inline int font_register(struct font_desc *font)
+{
+ return -ENOTSUPP;
+}
+
+#endif
+
#endif /* _VIDEO_FONT_H */
--
2.14.3
More information about the barebox
mailing list