summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/leds-ebsa110.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /arch/arm/kernel/leds-ebsa110.c
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'arch/arm/kernel/leds-ebsa110.c')
-rw-r--r--arch/arm/kernel/leds-ebsa110.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/arch/arm/kernel/leds-ebsa110.c b/arch/arm/kernel/leds-ebsa110.c
index 7b2c886ef..17cb356e4 100644
--- a/arch/arm/kernel/leds-ebsa110.c
+++ b/arch/arm/kernel/leds-ebsa110.c
@@ -1,23 +1,32 @@
/*
- * arch/arm/kernel/leds-ebsa110.c
+ * linux/arch/arm/kernel/leds-ebsa110.c
*
- * Copyright (C) 1998 Russell King
+ * Copyright (C) 1998 Russell King
*
- * EBSA-110 LED control routines. We use the led as follows:
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
- * - Red - toggles state every 50 timer interrupts
+ * EBSA-110 LED control routines. We use the led as follows:
+ *
+ * - Red - toggles state every 50 timer interrupts
*/
#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/init.h>
#include <asm/hardware.h>
#include <asm/leds.h>
#include <asm/system.h>
+#include <asm/mach-types.h>
+
+static spinlock_t leds_lock;
static void ebsa110_leds_event(led_event_t ledevt)
{
unsigned long flags;
- save_flags_cli(flags);
+ spin_lock_irqsave(&leds_lock, flags);
switch(ledevt) {
case led_timer:
@@ -28,9 +37,15 @@ static void ebsa110_leds_event(led_event_t ledevt)
break;
}
- restore_flags(flags);
+ spin_unlock_irqrestore(&leds_lock, flags);
}
-void (*leds_event)(led_event_t) = ebsa110_leds_event;
+static int __init leds_init(void)
+{
+ if (machine_is_ebsa110())
+ leds_event = ebsa110_leds_event;
+
+ return 0;
+}
-EXPORT_SYMBOL(leds_event);
+__initcall(leds_init);