Commit 688466a4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fb_console_init fix

From: James Simmons <jsimmons@infradead.org>

This patch fixes fb_console_init from being called twice.  I still need to
fix set_con2fb but this helps but this is still important to get in.
parent e3459dfb
...@@ -2345,6 +2345,7 @@ int __init fb_console_init(void) ...@@ -2345,6 +2345,7 @@ int __init fb_console_init(void)
{ {
if (!num_registered_fb) if (!num_registered_fb)
return -ENODEV; return -ENODEV;
take_over_console(&fb_con, first_fb_vc, last_fb_vc, fbcon_is_default); take_over_console(&fb_con, first_fb_vc, last_fb_vc, fbcon_is_default);
acquire_console_sem(); acquire_console_sem();
if (!fbcon_event_notifier_registered) { if (!fbcon_event_notifier_registered) {
...@@ -2352,10 +2353,11 @@ int __init fb_console_init(void) ...@@ -2352,10 +2353,11 @@ int __init fb_console_init(void)
fbcon_event_notifier_registered = 1; fbcon_event_notifier_registered = 1;
} }
release_console_sem(); release_console_sem();
return 0; return 0;
} }
#ifdef MODULE
void __exit fb_console_exit(void) void __exit fb_console_exit(void)
{ {
acquire_console_sem(); acquire_console_sem();
...@@ -2370,6 +2372,8 @@ void __exit fb_console_exit(void) ...@@ -2370,6 +2372,8 @@ void __exit fb_console_exit(void)
module_init(fb_console_init); module_init(fb_console_init);
module_exit(fb_console_exit); module_exit(fb_console_exit);
#endif
/* /*
* Visible symbols for modules * Visible symbols for modules
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment