Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373229
b: refs/heads/master
c: 7a93fb3
h: refs/heads/master
i:
  373227: 758521d
v: v3
  • Loading branch information
Fabio Baltieri authored and Samuel Ortiz committed Apr 9, 2013
1 parent c4c9977 commit 201cd3e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d95c785500f60c59e4257385af2cfee7d4044809
refs/heads/master: 7a93fb375437225ee89a15652a887547450f3d2a
27 changes: 14 additions & 13 deletions trunk/drivers/mfd/ab8500-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,22 +458,23 @@ static void update_latch_offset(u8 *offset, int i)
static int ab8500_handle_hierarchical_line(struct ab8500 *ab8500,
int latch_offset, u8 latch_val)
{
int int_bit = __ffs(latch_val);
int line, i;
int int_bit, line, i;

do {
int_bit = __ffs(latch_val);
for (i = 0; i < ab8500->mask_size; i++)
if (ab8500->irq_reg_offset[i] == latch_offset)
break;

for (i = 0; i < ab8500->mask_size; i++)
if (ab8500->irq_reg_offset[i] == latch_offset)
break;
if (i >= ab8500->mask_size) {
dev_err(ab8500->dev, "Register offset 0x%2x not declared\n",
latch_offset);
return -ENXIO;
}

if (i >= ab8500->mask_size) {
dev_err(ab8500->dev, "Register offset 0x%2x not declared\n",
latch_offset);
return -ENXIO;
}
/* ignore masked out interrupts */
latch_val &= ~ab8500->mask[i];

while (latch_val) {
int_bit = __ffs(latch_val);
line = (i << 3) + int_bit;
latch_val &= ~(1 << int_bit);

Expand All @@ -491,7 +492,7 @@ static int ab8500_handle_hierarchical_line(struct ab8500 *ab8500,
line += 1;

handle_nested_irq(ab8500->irq_base + line);
} while (latch_val);
}

return 0;
}
Expand Down

0 comments on commit 201cd3e

Please sign in to comment.