summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-24 17:41:47 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-24 17:41:47 +0000
commit2d40d566d7e934e0c9ae2d5f18d55808b6e8db97 (patch)
treeacd1d3604fe2bae4fb9430c47a458604939b7c5a /firmware/target
parent88a8ed84978ac6f88582baee98bad88179586202 (diff)
as3525: don't destroy status when calculating IRQ number in UIRQ()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26260 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/as3525/system-as3525.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index 80804d41da..f215300f75 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -87,7 +87,6 @@ static const char * const irqname[] =
static void UIRQ(void)
{
- unsigned int irq_no = 0;
bool masked = false;
int status = VIC_IRQ_STATUS;
if(status == 0)
@@ -99,8 +98,7 @@ static void UIRQ(void)
if(status == 0)
panicf("Unhandled IRQ (source unknown!)");
- while((status >>= 1))
- irq_no++;
+ unsigned irq_no = find_first_set_bit(status);
panicf("Unhandled %smasked IRQ %02X: %s (status 0x%8X)",
masked ? "" : "no", irq_no, irqname[irq_no], status);