]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] fb_console_init fix
authorAndrew Morton <akpm@osdl.org>
Fri, 12 Mar 2004 00:12:26 +0000 (16:12 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 12 Mar 2004 00:12:26 +0000 (16:12 -0800)
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.

drivers/video/console/fbcon.c

index 09c06877ce1e68017f34bb45d47569aa616080ce..c9a08b4f7e9a68dafeff9e5956f05d0ea6093bf6 100644 (file)
@@ -2345,6 +2345,7 @@ int __init fb_console_init(void)
 {
        if (!num_registered_fb)
                return -ENODEV;
+
        take_over_console(&fb_con, first_fb_vc, last_fb_vc, fbcon_is_default);
        acquire_console_sem();
        if (!fbcon_event_notifier_registered) {
@@ -2352,10 +2353,11 @@ int __init fb_console_init(void)
                fbcon_event_notifier_registered = 1;
        } 
        release_console_sem();
-
        return 0;
 }
 
+#ifdef MODULE
+
 void __exit fb_console_exit(void)
 {
        acquire_console_sem();
@@ -2370,6 +2372,8 @@ void __exit fb_console_exit(void)
 module_init(fb_console_init);
 module_exit(fb_console_exit);
 
+#endif
+
 /*
  *  Visible symbols for modules
  */