Skip to content

Commit

Permalink
regmap: irq: Only update mask bits when doing initial mask
Browse files Browse the repository at this point in the history
Don't write the full register, it's possible there's bits other than the
masks in the same register which we shouldn't be changing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
  • Loading branch information
Mark Brown committed Aug 4, 2012
1 parent 1603262 commit 0eb46ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/base/regmap/regmap-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
d->mask_buf[i] = d->mask_buf_def[i];
reg = chip->mask_base +
(i * map->reg_stride * d->irq_reg_stride);
ret = regmap_write(map, reg, d->mask_buf[i]);
ret = regmap_update_bits(map, reg,
d->mask_buf[i], d->mask_buf[i]);
if (ret != 0) {
dev_err(map->dev, "Failed to set masks in 0x%x: %d\n",
reg, ret);
Expand Down

0 comments on commit 0eb46ad

Please sign in to comment.