aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/vt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r--drivers/char/vt.c43
1 files changed, 27 insertions, 16 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 037d8a3f5882b2..714d95ff2f1e46 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2691,22 +2691,6 @@ int __init vty_init(void)
static struct class *vtconsole_class;
-static int con_is_graphics(const struct consw *csw, int first, int last)
-{
- int i, retval = 0;
-
- for (i = first; i <= last; i++) {
- struct vc_data *vc = vc_cons[i].d;
-
- if (vc && vc->vc_mode == KD_GRAPHICS) {
- retval = 1;
- break;
- }
- }
-
- return retval;
-}
-
static int bind_con_driver(const struct consw *csw, int first, int last,
int deflt)
{
@@ -2808,6 +2792,23 @@ err:
return retval;
};
+#ifdef CONFIG_VT_HW_CONSOLE_BINDING
+static int con_is_graphics(const struct consw *csw, int first, int last)
+{
+ int i, retval = 0;
+
+ for (i = first; i <= last; i++) {
+ struct vc_data *vc = vc_cons[i].d;
+
+ if (vc && vc->vc_mode == KD_GRAPHICS) {
+ retval = 1;
+ break;
+ }
+ }
+
+ return retval;
+}
+
static int unbind_con_driver(const struct consw *csw, int first, int last,
int deflt)
{
@@ -2984,6 +2985,16 @@ static int vt_unbind(struct con_driver *con)
err:
return 0;
}
+#else
+static inline int vt_bind(struct con_driver *con)
+{
+ return 0;
+}
+static inline int vt_unbind(struct con_driver *con)
+{
+ return 0;
+}
+#endif /* CONFIG_VT_HW_CONSOLE_BINDING */
static ssize_t store_bind(struct class_device *class_device,
const char *buf, size_t count)