summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/core/fbcon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/core/fbcon.c')
-rw-r--r--drivers/video/fbdev/core/fbcon.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index f7f3eb0f1893..d1e37afa6f80 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -3046,7 +3046,7 @@ static int fbcon_mode_deleted(struct fb_info *info,
}
#ifdef CONFIG_VT_HW_CONSOLE_BINDING
-static int fbcon_unbind(void)
+static void fbcon_unbind(void)
{
int ret;
@@ -3055,25 +3055,21 @@ static int fbcon_unbind(void)
if (!ret)
fbcon_has_console_bind = 0;
-
- return ret;
}
#else
-static inline int fbcon_unbind(void)
-{
- return -EINVAL;
-}
+static inline void fbcon_unbind(void) {}
#endif /* CONFIG_VT_HW_CONSOLE_BINDING */
/* called with console_lock held */
-static int fbcon_fb_unbind(int idx)
+void fbcon_fb_unbind(struct fb_info *info)
{
int i, new_idx = -1, ret = 0;
+ int idx = info->node;
WARN_CONSOLE_UNLOCKED();
if (!fbcon_has_console_bind)
- return 0;
+ return;
for (i = first_fb_vc; i <= last_fb_vc; i++) {
if (con2fb_map[i] != idx &&
@@ -3106,15 +3102,13 @@ static int fbcon_fb_unbind(int idx)
idx, 0);
if (ret) {
con2fb_map[i] = idx;
- return ret;
+ return;
}
}
}
}
- ret = fbcon_unbind();
+ fbcon_unbind();
}
-
- return ret;
}
/* called with console_lock held */
@@ -3352,10 +3346,6 @@ static int fbcon_event_notify(struct notifier_block *self,
mode = event->data;
ret = fbcon_mode_deleted(info, mode);
break;
- case FB_EVENT_FB_UNBIND:
- idx = info->node;
- ret = fbcon_fb_unbind(idx);
- break;
case FB_EVENT_SET_CONSOLE_MAP:
/* called with console lock held */
con2fb = event->data;