Commit 9261ec1a8d7b17e2540bef7cad3470870d13b61e
1 parent
fc1caf6eaf
Exists in
master
and in
4 other branches
console: Fix compilation regression
A regression of building without CONFIG_HW_CONSOLE was introduced with commit b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb: implement atomic console enter/leave functions). ERROR: "con_debug_enter" [drivers/serial/kgdboc.ko] undefined! ERROR: "vc_cons" [drivers/serial/kgdboc.ko] undefined! ERROR: "fg_console" [drivers/serial/kgdboc.ko] undefined! ERROR: "con_debug_leave" [drivers/serial/kgdboc.ko] undefined! When there is no HW console the con_debug_enter and con_debug_leave functions should have no code. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> CC: Jesse Barnes <jbarnes@virtuousgeek.org> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff
include/linux/console.h
... | ... | @@ -79,8 +79,13 @@ |
79 | 79 | int unregister_con_driver(const struct consw *csw); |
80 | 80 | int take_over_console(const struct consw *sw, int first, int last, int deflt); |
81 | 81 | void give_up_console(const struct consw *sw); |
82 | +#ifdef CONFIG_HW_CONSOLE | |
82 | 83 | int con_debug_enter(struct vc_data *vc); |
83 | 84 | int con_debug_leave(void); |
85 | +#else | |
86 | +#define con_debug_enter(vc) (0) | |
87 | +#define con_debug_leave() (0) | |
88 | +#endif | |
84 | 89 | |
85 | 90 | /* scroll */ |
86 | 91 | #define SM_UP (1) |