Skip to content

Commit c88e40e

Browse files
committed
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()
2 parents 39071cf + 63b2de1 commit c88e40e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/mfd/stmfx.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,11 @@ static struct irq_chip stmfx_irq_chip = {
204204
static irqreturn_t stmfx_irq_handler(int irq, void *data)
205205
{
206206
struct stmfx *stmfx = data;
207-
unsigned long n, pending;
208-
u32 ack;
209-
int ret;
207+
unsigned long bits;
208+
u32 pending, ack;
209+
int n, ret;
210210

211-
ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING,
212-
(u32 *)&pending);
211+
ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING, &pending);
213212
if (ret)
214213
return IRQ_NONE;
215214

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

227-
for_each_set_bit(n, &pending, STMFX_REG_IRQ_SRC_MAX)
226+
bits = pending;
227+
for_each_set_bit(n, &bits, STMFX_REG_IRQ_SRC_MAX)
228228
handle_nested_irq(irq_find_mapping(stmfx->irq_domain, n));
229229

230230
return IRQ_HANDLED;

0 commit comments

Comments
 (0)