linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / parisc / led.c
index 298f2dd..3627a2d 100644 (file)
@@ -499,16 +499,11 @@ static int led_halt(struct notifier_block *, unsigned long, void *);
 static struct notifier_block led_notifier = {
        .notifier_call = led_halt,
 };
-static int notifier_disabled = 0;
 
 static int led_halt(struct notifier_block *nb, unsigned long event, void *buf) 
 {
        char *txt;
-
-       if (notifier_disabled)
-               return NOTIFY_OK;
-
-       notifier_disabled = 1;
+       
        switch (event) {
        case SYS_RESTART:       txt = "SYSTEM RESTART";
                                break;
@@ -532,6 +527,7 @@ static int led_halt(struct notifier_block *nb, unsigned long event, void *buf)
                if (led_func_ptr)
                        led_func_ptr(0xff); /* turn all LEDs ON */
        
+       unregister_reboot_notifier(&led_notifier);
        return NOTIFY_OK;
 }
 
@@ -762,12 +758,6 @@ not_found:
        return 1;
 }
 
-static void __exit led_exit(void)
-{
-       unregister_reboot_notifier(&led_notifier);
-       return;
-}
-
 #ifdef CONFIG_PROC_FS
 module_init(led_create_procfs)
 #endif