]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
AVR32: Fix logic inversion in disable_interrupts()
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Mon, 17 Dec 2007 10:02:44 +0000 (11:02 +0100)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Mon, 17 Dec 2007 10:02:44 +0000 (11:02 +0100)
disable_interrupts() should return nonzero if interrupts were
_enabled_ before, not disabled.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
lib_avr32/interrupts.c

index ce538f3d9241a5a590824d87383a8e2aeac83d18..28df20db01079fe4b84619016f483397b2d6dc04 100644 (file)
@@ -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);
 }