diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-03 13:58:33 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-03 14:30:33 +0000 |
commit | bbae92ca49f77898277576e3377b09e1391a3271 (patch) | |
tree | bbab5e3a951d4dec6f6778767c7426b942ea2e6b /drivers/base | |
parent | 55ac85e942c6783e728964861df36fc80e8ced93 (diff) | |
download | linux-stable-bbae92ca49f77898277576e3377b09e1391a3271.tar.gz linux-stable-bbae92ca49f77898277576e3377b09e1391a3271.tar.bz2 linux-stable-bbae92ca49f77898277576e3377b09e1391a3271.zip |
regmap: irq: Factor register read out of the IRQ parsing loop
In preparation for adding back support for block reads.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 91294935130e..329be9836716 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -170,13 +170,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) } } - /* - * Ignore masked IRQs and ack if we need to; we ack early so - * there is no race between handling and acknowleding the - * interrupt. We assume that typically few of the interrupts - * will fire simultaneously so don't worry about overhead from - * doing a write per register. - */ for (i = 0; i < data->chip->num_regs; i++) { ret = regmap_read(map, chip->status_base + (i * map->reg_stride * data->irq_reg_stride), @@ -189,7 +182,16 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) pm_runtime_put(map->dev); return IRQ_NONE; } + } + /* + * Ignore masked IRQs and ack if we need to; we ack early so + * there is no race between handling and acknowleding the + * interrupt. We assume that typically few of the interrupts + * will fire simultaneously so don't worry about overhead from + * doing a write per register. + */ + for (i = 0; i < data->chip->num_regs; i++) { data->status_buf[i] &= ~data->mask_buf[i]; if (data->status_buf[i] && chip->ack_base) { |