提交 c88e40e0 编写于 作者: L Linus Torvalds

Merge tag 'mfd-fixes-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/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()
...@@ -204,12 +204,11 @@ static struct irq_chip stmfx_irq_chip = { ...@@ -204,12 +204,11 @@ static struct irq_chip stmfx_irq_chip = {
static irqreturn_t stmfx_irq_handler(int irq, void *data) static irqreturn_t stmfx_irq_handler(int irq, void *data)
{ {
struct stmfx *stmfx = data; struct stmfx *stmfx = data;
unsigned long n, pending; unsigned long bits;
u32 ack; u32 pending, ack;
int ret; int n, ret;
ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING, ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING, &pending);
(u32 *)&pending);
if (ret) if (ret)
return IRQ_NONE; return IRQ_NONE;
...@@ -224,7 +223,8 @@ static irqreturn_t stmfx_irq_handler(int irq, void *data) ...@@ -224,7 +223,8 @@ static irqreturn_t stmfx_irq_handler(int irq, void *data)
return IRQ_NONE; 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)); handle_nested_irq(irq_find_mapping(stmfx->irq_domain, n));
return IRQ_HANDLED; return IRQ_HANDLED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册