summaryrefslogtreecommitdiff
path: root/lib_avr32/interrupts.c
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-12-17 11:02:44 +0100
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-12-17 11:02:44 +0100
commitdf9c25ea04b38a0e05d4f8c73c5cc144cdafa7db (patch)
tree05c600c6a1e908535aaf9880927d5ff9593d3469 /lib_avr32/interrupts.c
parentacac475212cbedb17b321a363a1c878e2b47b37f (diff)
downloadu-boot-imx-df9c25ea04b38a0e05d4f8c73c5cc144cdafa7db.zip
u-boot-imx-df9c25ea04b38a0e05d4f8c73c5cc144cdafa7db.tar.gz
u-boot-imx-df9c25ea04b38a0e05d4f8c73c5cc144cdafa7db.tar.bz2
AVR32: Fix logic inversion in disable_interrupts()
disable_interrupts() should return nonzero if interrupts were _enabled_ before, not disabled. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'lib_avr32/interrupts.c')
-rw-r--r--lib_avr32/interrupts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib_avr32/interrupts.c b/lib_avr32/interrupts.c
index ce538f3..28df20d 100644
--- a/lib_avr32/interrupts.c
+++ b/lib_avr32/interrupts.c
@@ -35,5 +35,5 @@ int disable_interrupts(void)
sr = sysreg_read(SR);
asm volatile("ssrf %0" : : "n"(SYSREG_GM_OFFSET));
- return SYSREG_BFEXT(GM, sr);
+ return !SYSREG_BFEXT(GM, sr);
}