TTY:vt: convert remain take_over_console's users to do_take_over_console
authorWang YanQing <udknight@gmail.com>
Tue, 21 May 2013 05:15:12 +0000 (13:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2013 05:29:27 +0000 (22:29 -0700)
Impact:
1:convert all remain take_over_console to do_take_over_console
2:update take_over_console to do_take_over_console in comment

Commit dc9641895abb ("vt: delete unneeded functions
register_con_driver|take_over_console") delete take_over_console,
but forget to convert remain take_over_console's users to new API
do_take_over_console, this patch fix it.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/alpha/kernel/console.c
arch/alpha/kernel/process.c
arch/mips/pci/pci-bcm1480.c
arch/mips/pci/pci-sb1250.c
arch/parisc/kernel/setup.c
drivers/tty/vt/vt.c
drivers/usb/misc/sisusbvga/sisusb_con.c
drivers/video/console/fbcon.c
drivers/video/console/mdacon.c
drivers/video/console/newport_con.c
drivers/video/console/sticon.c

index da711e37fc975af1041b7229d02b5aea84856f40..6a61deed4a853ce8fdbb6b753070f2ca29aef08f 100644 (file)
@@ -61,7 +61,9 @@ locate_and_init_vga(void *(*sel_func)(void *, void *))
 
        /* Set the VGA hose and init the new console. */
        pci_vga_hose = hose;
-       take_over_console(&vga_con, 0, MAX_NR_CONSOLES-1, 1);
+       console_lock();
+       do_take_over_console(&vga_con, 0, MAX_NR_CONSOLES-1, 1);
+       console_unlock();
 }
 
 void __init
index ab80a80d38a214d57d6fa06c2f2e8e601ea0415b..f2360a74e5d5544983160d951c46bddb98819e0e 100644 (file)
@@ -117,7 +117,9 @@ common_shutdown_1(void *generic_ptr)
                if (in_interrupt())
                        irq_exit();
                /* This has the effect of resetting the VGA video origin.  */
-               take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
+               console_lock();
+               do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
+               console_unlock();
 #endif
                pci_restore_srm_config();
                set_hae(srm_hae);
index e2e69e1e9fe14fac77226b2f857db6d1b09b054e..44dd5aa2e36f2d44fdc78ef9baca79234c80d510 100644 (file)
@@ -257,7 +257,9 @@ static int __init bcm1480_pcibios_init(void)
        register_pci_controller(&bcm1480_controller);
 
 #ifdef CONFIG_VGA_CONSOLE
-       take_over_console(&vga_con, 0, MAX_NR_CONSOLES-1, 1);
+       console_lock();
+       do_take_over_console(&vga_con, 0, MAX_NR_CONSOLES-1, 1);
+       console_unlock();
 #endif
        return 0;
 }
index cdefcc4cb8d448c36b3bd4a52f448e3288ae32f9..fc634aeda4a576fd6735cda7cd2779834bb5c881 100644 (file)
@@ -283,7 +283,9 @@ static int __init sb1250_pcibios_init(void)
        register_pci_controller(&sb1250_controller);
 
 #ifdef CONFIG_VGA_CONSOLE
-       take_over_console(&vga_con, 0, MAX_NR_CONSOLES - 1, 1);
+       console_lock();
+       do_take_over_console(&vga_con, 0, MAX_NR_CONSOLES - 1, 1);
+       console_unlock();
 #endif
        return 0;
 }
index 76b63e726a539ee912bea1077d00370603e1f538..60c1ae60487662bb3e9e580c2b8cd5a5704684a0 100644 (file)
@@ -155,7 +155,7 @@ void __init setup_arch(char **cmdline_p)
 #endif
 
 #if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
-       conswitchp = &dummy_con;        /* we use take_over_console() later ! */
+       conswitchp = &dummy_con;        /* we use do_take_over_console() later ! */
 #endif
 
 }
index 405e1c90ada23fce95ab04bd6eb361fe115a1d2c..d4ba2ba78d1382c585ace2404a227b91f5d230e0 100644 (file)
@@ -3592,7 +3592,7 @@ EXPORT_SYMBOL_GPL(do_unregister_con_driver);
  *     when a driver wants to take over some existing consoles
  *     and become default driver for newly opened ones.
  *
- *     take_over_console is basically a register followed by unbind
+ *     do_take_over_console is basically a register followed by unbind
  */
 int do_take_over_console(const struct consw *csw, int first, int last, int deflt)
 {
index 411e605f448af32f07fd02034917aa61f245ea4c..a638c4e9a947b38a140602c78ee3807de9f90652 100644 (file)
@@ -208,7 +208,7 @@ sisusbcon_init(struct vc_data *c, int init)
        struct sisusb_usb_data *sisusb;
        int cols, rows;
 
-       /* This is called by take_over_console(),
+       /* This is called by do_take_over_console(),
         * ie by us/under our control. It is
         * only called after text mode and fonts
         * are set up/restored.
@@ -273,7 +273,7 @@ sisusbcon_deinit(struct vc_data *c)
        struct sisusb_usb_data *sisusb;
        int i;
 
-       /* This is called by take_over_console()
+       /* This is called by do_take_over_console()
         * and others, ie not under our control.
         */
 
@@ -1490,8 +1490,9 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last)
        mutex_unlock(&sisusb->lock);
 
        /* Now grab the desired console(s) */
-       ret = take_over_console(&sisusb_con, first - 1, last - 1, 0);
-
+       console_lock();
+       ret = do_take_over_console(&sisusb_con, first - 1, last - 1, 0);
+       console_unlock();
        if (!ret)
                sisusb->haveconsole = 1;
        else {
@@ -1535,11 +1536,14 @@ sisusb_console_exit(struct sisusb_usb_data *sisusb)
 
        if (sisusb->haveconsole) {
                for (i = 0; i < MAX_NR_CONSOLES; i++)
-                       if (sisusb->havethisconsole[i])
-                               take_over_console(&sisusb_dummy_con, i, i, 0);
+                       if (sisusb->havethisconsole[i]) {
+                               console_lock();
+                               do_take_over_console(&sisusb_dummy_con, i, i, 0);
+                               console_unlock();
                                /* At this point, con_deinit for all our
-                                * consoles is executed by take_over_console().
+                                * consoles is executed by do_take_over_console().
                                 */
+                       }
                sisusb->haveconsole = 0;
        }
 
index a09c667c0c3ddbfbfb2d301c347123f4181d40a2..d55b33757465bf971dad6af8e4698518b717b944 100644 (file)
@@ -873,7 +873,7 @@ static int set_con2fb_map(int unit, int newidx, int user)
 /*
  *  Low Level Operations
  */
-/* NOTE: fbcon cannot be __init: it may be called from take_over_console later */
+/* NOTE: fbcon cannot be __init: it may be called from do_take_over_console later */
 static int var_to_display(struct display *disp,
                          struct fb_var_screeninfo *var,
                          struct fb_info *info)
index 0b67866cae10334200e1570d421cc5f74d56c7ea..296e945615560b85cf2f7d50990776f46eeb119a 100644 (file)
@@ -585,10 +585,14 @@ static const struct consw mda_con = {
 
 int __init mda_console_init(void)
 {
+       int err;
+
        if (mda_first_vc > mda_last_vc)
                return 1;
-
-       return take_over_console(&mda_con, mda_first_vc-1, mda_last_vc-1, 0);
+       console_lock();
+       err = do_take_over_console(&mda_con, mda_first_vc-1, mda_last_vc-1, 0);
+       console_unlock();
+       return err;
 }
 
 static void __exit mda_console_exit(void)
index b05afd03729eb7c1155aac758ea538948d81fb9f..a6ab9299813c9558dcf9e2cb2ec629e3b557e398 100644 (file)
@@ -297,7 +297,7 @@ static void newport_exit(void)
                newport_set_def_font(i, NULL);
 }
 
-/* Can't be __init, take_over_console may call it later */
+/* Can't be __init, do_take_over_console may call it later */
 static const char *newport_startup(void)
 {
        int i;
@@ -746,6 +746,7 @@ static int newport_probe(struct gio_device *dev,
                         const struct gio_device_id *id)
 {
        unsigned long newport_addr;
+       int err;
 
        if (!dev->resource.start)
                return -EINVAL;
@@ -759,8 +760,10 @@ static int newport_probe(struct gio_device *dev,
 
        npregs = (struct newport_regs *)/* ioremap cannot fail */
                ioremap(newport_addr, sizeof(struct newport_regs));
-
-       return take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1);
+       console_lock();
+       err = do_take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1);
+       console_unlock();
+       return err;
 }
 
 static void newport_remove(struct gio_device *dev)
index 491c1c1baf4ccd652eadf85079544686064e3228..5f65ca3d85645edabc1b4f051173ebdb1d4c3d35 100644 (file)
@@ -372,6 +372,7 @@ static const struct consw sti_con = {
 
 static int __init sticonsole_init(void)
 {
+    int err;
     /* already initialized ? */
     if (sticon_sti)
         return 0;
@@ -382,7 +383,10 @@ static int __init sticonsole_init(void)
 
     if (conswitchp == &dummy_con) {
        printk(KERN_INFO "sticon: Initializing STI text console.\n");
-       return take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 1);
+       console_lock();
+       err = do_take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 1);
+       console_unlock();
+       return err;
     }
     return 0;
 }
This page took 0.03346 seconds and 5 git commands to generate.