aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r--drivers/base/regmap/regmap-irq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 56b8136eb36a..fc69d29d272a 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -50,6 +50,7 @@ static void regmap_irq_lock(struct irq_data *data)
50static void regmap_irq_sync_unlock(struct irq_data *data) 50static void regmap_irq_sync_unlock(struct irq_data *data)
51{ 51{
52 struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data); 52 struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
53 struct regmap *map = d->map;
53 int i, ret; 54 int i, ret;
54 55
55 /* 56 /*
@@ -59,7 +60,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
59 */ 60 */
60 for (i = 0; i < d->chip->num_regs; i++) { 61 for (i = 0; i < d->chip->num_regs; i++) {
61 ret = regmap_update_bits(d->map, d->chip->mask_base + 62 ret = regmap_update_bits(d->map, d->chip->mask_base +
62 (i * map->map->reg_stride), 63 (i * map->reg_stride),
63 d->mask_buf_def[i], d->mask_buf[i]); 64 d->mask_buf_def[i], d->mask_buf[i]);
64 if (ret != 0) 65 if (ret != 0)
65 dev_err(d->map->dev, "Failed to sync masks in %x\n", 66 dev_err(d->map->dev, "Failed to sync masks in %x\n",
@@ -72,6 +73,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
72static void regmap_irq_enable(struct irq_data *data) 73static void regmap_irq_enable(struct irq_data *data)
73{ 74{
74 struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data); 75 struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
76 struct regmap *map = d->map;
75 const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq); 77 const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq);
76 78
77 d->mask_buf[irq_data->reg_offset / map->reg_stride] &= ~irq_data->mask; 79 d->mask_buf[irq_data->reg_offset / map->reg_stride] &= ~irq_data->mask;
@@ -80,6 +82,7 @@ static void regmap_irq_enable(struct irq_data *data)
80static void regmap_irq_disable(struct irq_data *data) 82static void regmap_irq_disable(struct irq_data *data)
81{ 83{
82 struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data); 84 struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
85 struct regmap *map = d->map;
83 const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq); 86 const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq);
84 87
85 d->mask_buf[irq_data->reg_offset / map->reg_stride] |= irq_data->mask; 88 d->mask_buf[irq_data->reg_offset / map->reg_stride] |= irq_data->mask;