summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/export/system.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h
index 7ac5c1d1d5..1205e9360b 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -147,12 +147,12 @@ enum {
#define HIGHEST_IRQ_LEVEL (7<<8)
static inline int set_irq_level(int level)
{
- int i;
+ int oldlevel;
/* Read the old level and set the new one */
asm volatile ("move.w %%sr,%0\n"
"or.l #0x2000,%1\n"
- "move.w %1,%%sr\n" : "=r" (i) : "r" (level));
- return i;
+ "move.w %1,%%sr\n" : "=r" (oldlevel), "+r" (level) : );
+ return oldlevel;
}
#endif