summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorWang YanQing <udknight@gmail.com>2013-05-21 13:15:12 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-20 22:29:27 -0700
commit155957f56c3537dbb63bbb63c39067987c061a6d (patch)
treebe1947621ca0a310f21fd24c33f28b3dc0aa9a5d /drivers/usb/misc
parent4898e640caf03fdbaf2122d5a33949bf3e4a5b34 (diff)
downloadlinux-155957f56c3537dbb63bbb63c39067987c061a6d.tar.bz2
TTY:vt: convert remain take_over_console's users to do_take_over_console
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>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb_con.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c
index 411e605f448a..a638c4e9a947 100644
--- a/drivers/usb/misc/sisusbvga/sisusb_con.c
+++ b/drivers/usb/misc/sisusbvga/sisusb_con.c
@@ -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;
}