From: Haavard Skinnemoen Date: Mon, 17 Dec 2007 10:02:44 +0000 (+0100) Subject: AVR32: Fix logic inversion in disable_interrupts() X-Git-Tag: v1.3.2-rc1~108^2^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=df9c25ea04b38a0e05d4f8c73c5cc144cdafa7db;p=u-boot AVR32: Fix logic inversion in disable_interrupts() disable_interrupts() should return nonzero if interrupts were _enabled_ before, not disabled. Signed-off-by: Haavard Skinnemoen --- diff --git a/lib_avr32/interrupts.c b/lib_avr32/interrupts.c index ce538f3d92..28df20db01 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); }