diff options
author | Wang YanQing <udknight@gmail.com> | 2013-05-21 07:15:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-21 07:29:27 +0200 |
commit | 155957f56c3537dbb63bbb63c39067987c061a6d (patch) | |
tree | be1947621ca0a310f21fd24c33f28b3dc0aa9a5d /drivers/video/console | |
parent | tty: Add timed, writer-prioritized rw semaphore (diff) | |
download | linux-155957f56c3537dbb63bbb63c39067987c061a6d.tar.xz linux-155957f56c3537dbb63bbb63c39067987c061a6d.zip |
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/video/console')
-rw-r--r-- | drivers/video/console/fbcon.c | 2 | ||||
-rw-r--r-- | drivers/video/console/mdacon.c | 8 | ||||
-rw-r--r-- | drivers/video/console/newport_con.c | 9 | ||||
-rw-r--r-- | drivers/video/console/sticon.c | 6 |
4 files changed, 18 insertions, 7 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index a09c667c0c3d..d55b33757465 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -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) diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index 0b67866cae10..296e94561556 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c @@ -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) diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index b05afd03729e..a6ab9299813c 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -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) diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 491c1c1baf4c..5f65ca3d8564 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -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; } |