diff options
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 037d8a3f5882..714d95ff2f1e 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -2691,22 +2691,6 @@ int __init vty_init(void) | |||
2691 | 2691 | ||
2692 | static struct class *vtconsole_class; | 2692 | static struct class *vtconsole_class; |
2693 | 2693 | ||
2694 | static int con_is_graphics(const struct consw *csw, int first, int last) | ||
2695 | { | ||
2696 | int i, retval = 0; | ||
2697 | |||
2698 | for (i = first; i <= last; i++) { | ||
2699 | struct vc_data *vc = vc_cons[i].d; | ||
2700 | |||
2701 | if (vc && vc->vc_mode == KD_GRAPHICS) { | ||
2702 | retval = 1; | ||
2703 | break; | ||
2704 | } | ||
2705 | } | ||
2706 | |||
2707 | return retval; | ||
2708 | } | ||
2709 | |||
2710 | static int bind_con_driver(const struct consw *csw, int first, int last, | 2694 | static int bind_con_driver(const struct consw *csw, int first, int last, |
2711 | int deflt) | 2695 | int deflt) |
2712 | { | 2696 | { |
@@ -2808,6 +2792,23 @@ err: | |||
2808 | return retval; | 2792 | return retval; |
2809 | }; | 2793 | }; |
2810 | 2794 | ||
2795 | #ifdef CONFIG_VT_HW_CONSOLE_BINDING | ||
2796 | static int con_is_graphics(const struct consw *csw, int first, int last) | ||
2797 | { | ||
2798 | int i, retval = 0; | ||
2799 | |||
2800 | for (i = first; i <= last; i++) { | ||
2801 | struct vc_data *vc = vc_cons[i].d; | ||
2802 | |||
2803 | if (vc && vc->vc_mode == KD_GRAPHICS) { | ||
2804 | retval = 1; | ||
2805 | break; | ||
2806 | } | ||
2807 | } | ||
2808 | |||
2809 | return retval; | ||
2810 | } | ||
2811 | |||
2811 | static int unbind_con_driver(const struct consw *csw, int first, int last, | 2812 | static int unbind_con_driver(const struct consw *csw, int first, int last, |
2812 | int deflt) | 2813 | int deflt) |
2813 | { | 2814 | { |
@@ -2984,6 +2985,16 @@ static int vt_unbind(struct con_driver *con) | |||
2984 | err: | 2985 | err: |
2985 | return 0; | 2986 | return 0; |
2986 | } | 2987 | } |
2988 | #else | ||
2989 | static inline int vt_bind(struct con_driver *con) | ||
2990 | { | ||
2991 | return 0; | ||
2992 | } | ||
2993 | static inline int vt_unbind(struct con_driver *con) | ||
2994 | { | ||
2995 | return 0; | ||
2996 | } | ||
2997 | #endif /* CONFIG_VT_HW_CONSOLE_BINDING */ | ||
2987 | 2998 | ||
2988 | static ssize_t store_bind(struct class_device *class_device, | 2999 | static ssize_t store_bind(struct class_device *class_device, |
2989 | const char *buf, size_t count) | 3000 | const char *buf, size_t count) |