summaryrefslogtreecommitdiffstats
path: root/arch/mips/sibyte/swarm/setup.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-05-01 06:24:54 +0200
committerDmitry Torokhov <dtor@insightbb.com>2007-05-01 06:24:54 +0200
commitbc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 (patch)
tree427fcf2a7287c16d4b5aa6cbf494d59579a6a8b1 /arch/mips/sibyte/swarm/setup.c
parentInput: cobalt_btns - convert to use polldev library (diff)
parentlibata: honour host controllers that want just one host (diff)
downloadlinux-bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775.tar.xz
linux-bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/usb/input/Makefile drivers/usb/input/gtco.c
Diffstat (limited to 'arch/mips/sibyte/swarm/setup.c')
-rw-r--r--arch/mips/sibyte/swarm/setup.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c
index defa1f1452ad..83572d8f3e14 100644
--- a/arch/mips/sibyte/swarm/setup.c
+++ b/arch/mips/sibyte/swarm/setup.c
@@ -169,17 +169,19 @@ void __init plat_mem_setup(void)
#define LEDS_PHYS MLEDS_PHYS
#endif
-#define setled(index, c) \
- ((unsigned char *)(IOADDR(LEDS_PHYS)+0x20))[(3-(index))<<3] = (c)
void setleds(char *str)
{
+ void *reg;
int i;
+
for (i = 0; i < 4; i++) {
- if (!str[i]) {
- setled(i, ' ');
- } else {
- setled(i, str[i]);
- }
+ reg = IOADDR(LEDS_PHYS) + 0x20 + ((3 - i) << 3);
+
+ if (!str[i])
+ writeb(' ', reg);
+ else
+ writeb(str[i], reg);
}
}
-#endif
+
+#endif /* LEDS_PHYS */