Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6/
[firefly-linux-kernel-4.4.55.git] / drivers / char / vt.c
index 037d8a3f5882b27411d098922d35c281b4e7fc6d..d6f65032649ab83398407026accffa8c9071ffdd 100644 (file)
@@ -79,7 +79,6 @@
 #include <linux/mm.h>
 #include <linux/console.h>
 #include <linux/init.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/vt_kern.h>
 #include <linux/selection.h>
 #include <linux/tiocl.h>
@@ -2663,7 +2662,6 @@ int __init vty_init(void)
        if (!console_driver)
                panic("Couldn't allocate console driver\n");
        console_driver->owner = THIS_MODULE;
-       console_driver->devfs_name = "vc/";
        console_driver->name = "tty";
        console_driver->name_base = 1;
        console_driver->major = TTY_MAJOR;
@@ -2691,22 +2689,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 +2790,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 +2983,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)