aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console/fbcon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/console/fbcon.c')
-rw-r--r--drivers/video/console/fbcon.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 4bee7c2e6313..5a686cea23f4 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -114,6 +114,7 @@ static int last_fb_vc = MAX_NR_CONSOLES - 1;
114static int fbcon_is_default = 1; 114static int fbcon_is_default = 1;
115static int fbcon_has_exited; 115static int fbcon_has_exited;
116static int primary_device = -1; 116static int primary_device = -1;
117static int fbcon_has_console_bind;
117 118
118#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY 119#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY
119static int map_override; 120static int map_override;
@@ -544,6 +545,8 @@ static int fbcon_takeover(int show_logo)
544 con2fb_map[i] = -1; 545 con2fb_map[i] = -1;
545 } 546 }
546 info_idx = -1; 547 info_idx = -1;
548 } else {
549 fbcon_has_console_bind = 1;
547 } 550 }
548 551
549 return err; 552 return err;
@@ -2949,6 +2952,10 @@ static int fbcon_unbind(void)
2949 2952
2950 ret = unbind_con_driver(&fb_con, first_fb_vc, last_fb_vc, 2953 ret = unbind_con_driver(&fb_con, first_fb_vc, last_fb_vc,
2951 fbcon_is_default); 2954 fbcon_is_default);
2955
2956 if (!ret)
2957 fbcon_has_console_bind = 0;
2958
2952 return ret; 2959 return ret;
2953} 2960}
2954#else 2961#else
@@ -2962,6 +2969,9 @@ static int fbcon_fb_unbind(int idx)
2962{ 2969{
2963 int i, new_idx = -1, ret = 0; 2970 int i, new_idx = -1, ret = 0;
2964 2971
2972 if (!fbcon_has_console_bind)
2973 return 0;
2974
2965 for (i = first_fb_vc; i <= last_fb_vc; i++) { 2975 for (i = first_fb_vc; i <= last_fb_vc; i++) {
2966 if (con2fb_map[i] != idx && 2976 if (con2fb_map[i] != idx &&
2967 con2fb_map[i] != -1) { 2977 con2fb_map[i] != -1) {