diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-24 15:41:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-24 15:41:03 -0400 |
commit | c88e40e07cd967dcdf37321a63ab6e8b0d881100 (patch) | |
tree | 0f7bda70a3448e234851da937da12f175bb73caa | |
parent | 39071cf828b42fa62336849dc910d7b74c905698 (diff) | |
parent | 63b2de12b7eeacfb2edbe005f5c3cff17a2a02e2 (diff) |
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()
-rw-r--r-- | drivers/mfd/stmfx.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mfd/stmfx.c b/drivers/mfd/stmfx.c index fe8efba2d45f..857991cb3cbb 100644 --- a/drivers/mfd/stmfx.c +++ b/drivers/mfd/stmfx.c | |||
@@ -204,12 +204,11 @@ static struct irq_chip stmfx_irq_chip = { | |||
204 | static irqreturn_t stmfx_irq_handler(int irq, void *data) | 204 | static irqreturn_t stmfx_irq_handler(int irq, void *data) |
205 | { | 205 | { |
206 | struct stmfx *stmfx = data; | 206 | struct stmfx *stmfx = data; |
207 | unsigned long n, pending; | 207 | unsigned long bits; |
208 | u32 ack; | 208 | u32 pending, ack; |
209 | int ret; | 209 | int n, ret; |
210 | 210 | ||
211 | ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING, | 211 | ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING, &pending); |
212 | (u32 *)&pending); | ||
213 | if (ret) | 212 | if (ret) |
214 | return IRQ_NONE; | 213 | return IRQ_NONE; |
215 | 214 | ||
@@ -224,7 +223,8 @@ static irqreturn_t stmfx_irq_handler(int irq, void *data) | |||
224 | return IRQ_NONE; | 223 | return IRQ_NONE; |
225 | } | 224 | } |
226 | 225 | ||
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) | ||
228 | handle_nested_irq(irq_find_mapping(stmfx->irq_domain, n)); | 228 | handle_nested_irq(irq_find_mapping(stmfx->irq_domain, n)); |
229 | 229 | ||
230 | return IRQ_HANDLED; | 230 | return IRQ_HANDLED; |