diff options
| author | Wang YanQing <udknight@gmail.com> | 2013-05-21 01:15:12 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-21 01:29:27 -0400 |
| commit | 155957f56c3537dbb63bbb63c39067987c061a6d (patch) | |
| tree | be1947621ca0a310f21fd24c33f28b3dc0aa9a5d /drivers/video/console | |
| parent | 4898e640caf03fdbaf2122d5a33949bf3e4a5b34 (diff) | |
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) | |||
| 873 | /* | 873 | /* |
| 874 | * Low Level Operations | 874 | * Low Level Operations |
| 875 | */ | 875 | */ |
| 876 | /* NOTE: fbcon cannot be __init: it may be called from take_over_console later */ | 876 | /* NOTE: fbcon cannot be __init: it may be called from do_take_over_console later */ |
| 877 | static int var_to_display(struct display *disp, | 877 | static int var_to_display(struct display *disp, |
| 878 | struct fb_var_screeninfo *var, | 878 | struct fb_var_screeninfo *var, |
| 879 | struct fb_info *info) | 879 | 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 = { | |||
| 585 | 585 | ||
| 586 | int __init mda_console_init(void) | 586 | int __init mda_console_init(void) |
| 587 | { | 587 | { |
| 588 | int err; | ||
| 589 | |||
| 588 | if (mda_first_vc > mda_last_vc) | 590 | if (mda_first_vc > mda_last_vc) |
| 589 | return 1; | 591 | return 1; |
| 590 | 592 | console_lock(); | |
| 591 | return take_over_console(&mda_con, mda_first_vc-1, mda_last_vc-1, 0); | 593 | err = do_take_over_console(&mda_con, mda_first_vc-1, mda_last_vc-1, 0); |
| 594 | console_unlock(); | ||
| 595 | return err; | ||
| 592 | } | 596 | } |
| 593 | 597 | ||
| 594 | static void __exit mda_console_exit(void) | 598 | 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) | |||
| 297 | newport_set_def_font(i, NULL); | 297 | newport_set_def_font(i, NULL); |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | /* Can't be __init, take_over_console may call it later */ | 300 | /* Can't be __init, do_take_over_console may call it later */ |
| 301 | static const char *newport_startup(void) | 301 | static const char *newport_startup(void) |
| 302 | { | 302 | { |
| 303 | int i; | 303 | int i; |
| @@ -746,6 +746,7 @@ static int newport_probe(struct gio_device *dev, | |||
| 746 | const struct gio_device_id *id) | 746 | const struct gio_device_id *id) |
| 747 | { | 747 | { |
| 748 | unsigned long newport_addr; | 748 | unsigned long newport_addr; |
| 749 | int err; | ||
| 749 | 750 | ||
| 750 | if (!dev->resource.start) | 751 | if (!dev->resource.start) |
| 751 | return -EINVAL; | 752 | return -EINVAL; |
| @@ -759,8 +760,10 @@ static int newport_probe(struct gio_device *dev, | |||
| 759 | 760 | ||
| 760 | npregs = (struct newport_regs *)/* ioremap cannot fail */ | 761 | npregs = (struct newport_regs *)/* ioremap cannot fail */ |
| 761 | ioremap(newport_addr, sizeof(struct newport_regs)); | 762 | ioremap(newport_addr, sizeof(struct newport_regs)); |
| 762 | 763 | console_lock(); | |
| 763 | return take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1); | 764 | err = do_take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1); |
| 765 | console_unlock(); | ||
| 766 | return err; | ||
| 764 | } | 767 | } |
| 765 | 768 | ||
| 766 | static void newport_remove(struct gio_device *dev) | 769 | 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 = { | |||
| 372 | 372 | ||
| 373 | static int __init sticonsole_init(void) | 373 | static int __init sticonsole_init(void) |
| 374 | { | 374 | { |
| 375 | int err; | ||
| 375 | /* already initialized ? */ | 376 | /* already initialized ? */ |
| 376 | if (sticon_sti) | 377 | if (sticon_sti) |
| 377 | return 0; | 378 | return 0; |
| @@ -382,7 +383,10 @@ static int __init sticonsole_init(void) | |||
| 382 | 383 | ||
| 383 | if (conswitchp == &dummy_con) { | 384 | if (conswitchp == &dummy_con) { |
| 384 | printk(KERN_INFO "sticon: Initializing STI text console.\n"); | 385 | printk(KERN_INFO "sticon: Initializing STI text console.\n"); |
| 385 | return take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 1); | 386 | console_lock(); |
| 387 | err = do_take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 1); | ||
| 388 | console_unlock(); | ||
| 389 | return err; | ||
| 386 | } | 390 | } |
| 387 | return 0; | 391 | return 0; |
| 388 | } | 392 | } |
