Skip to content

Commit

Permalink
Merge tag 'mfd-fixes-5.2-1' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/lee/mfd

Pull mfd bugfix from Lee Jones.

Fix stmfx type confusion between regmap_read() (which takes an "u32")
and the bitmap operations (which take an "unsigned long" array).

* tag 'mfd-fixes-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
  mfd: stmfx: Fix an endian bug in stmfx_irq_handler()
  mfd: stmfx: Uninitialized variable in stmfx_irq_handler()
  • Loading branch information
torvalds committed Jun 24, 2019
2 parents 39071cf + 63b2de1 commit c88e40e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/mfd/stmfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,11 @@ static struct irq_chip stmfx_irq_chip = {
static irqreturn_t stmfx_irq_handler(int irq, void *data)
{
struct stmfx *stmfx = data;
unsigned long n, pending;
u32 ack;
int ret;
unsigned long bits;
u32 pending, ack;
int n, ret;

ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING,
(u32 *)&pending);
ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING, &pending);
if (ret)
return IRQ_NONE;

Expand All @@ -224,7 +223,8 @@ static irqreturn_t stmfx_irq_handler(int irq, void *data)
return IRQ_NONE;
}

for_each_set_bit(n, &pending, STMFX_REG_IRQ_SRC_MAX)
bits = pending;
for_each_set_bit(n, &bits, STMFX_REG_IRQ_SRC_MAX)
handle_nested_irq(irq_find_mapping(stmfx->irq_domain, n));

return IRQ_HANDLED;
Expand Down

0 comments on commit c88e40e

Please sign in to comment.