diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-01 23:29:14 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-04 15:13:53 +0400 |
commit | 0eb46ad0c8d60943c1f46cef795fc537fbffd177 (patch) | |
tree | fbf0bf634141cf46e9e8c134a7171813050c3c02 /drivers/base | |
parent | 16032624f511b2fac0671cba5e7da40aa7e73a66 (diff) | |
download | linux-0eb46ad0c8d60943c1f46cef795fc537fbffd177.tar.xz |
regmap: irq: Only update mask bits when doing initial mask
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>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index c7e5b18f4edc..4a52743b60cd 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -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); |