提交 a21361b9 编写于 作者: S Stephen Warren 提交者: Mark Brown

regmap: fix compile errors in regmap-irq.c due to stride changes

Commit f01ee60f ("regmap: implement register striding") caused the
compile errors below. Fix them.

drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_sync_unlock':
drivers/base/regmap/regmap-irq.c:62:12: error: 'map' undeclared (first use in this function)
drivers/base/regmap/regmap-irq.c:62:12: note: each undeclared identifier is reported only once for each function it appears in
drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_enable':
drivers/base/regmap/regmap-irq.c:77:37: error: 'map' undeclared (first use in this function)
drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_disable':
drivers/base/regmap/regmap-irq.c:85:37: error: 'map' undeclared (first use in this function)
Signed-off-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 edc9ae42
...@@ -50,6 +50,7 @@ static void regmap_irq_lock(struct irq_data *data) ...@@ -50,6 +50,7 @@ static void regmap_irq_lock(struct irq_data *data)
static void regmap_irq_sync_unlock(struct irq_data *data) static void regmap_irq_sync_unlock(struct irq_data *data)
{ {
struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data); struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
struct regmap *map = d->map;
int i, ret; int i, ret;
/* /*
...@@ -59,7 +60,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data) ...@@ -59,7 +60,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
*/ */
for (i = 0; i < d->chip->num_regs; i++) { for (i = 0; i < d->chip->num_regs; i++) {
ret = regmap_update_bits(d->map, d->chip->mask_base + ret = regmap_update_bits(d->map, d->chip->mask_base +
(i * map->map->reg_stride), (i * map->reg_stride),
d->mask_buf_def[i], d->mask_buf[i]); d->mask_buf_def[i], d->mask_buf[i]);
if (ret != 0) if (ret != 0)
dev_err(d->map->dev, "Failed to sync masks in %x\n", 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) ...@@ -72,6 +73,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
static void regmap_irq_enable(struct irq_data *data) static void regmap_irq_enable(struct irq_data *data)
{ {
struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data); struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
struct regmap *map = d->map;
const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq); const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq);
d->mask_buf[irq_data->reg_offset / map->reg_stride] &= ~irq_data->mask; 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) ...@@ -80,6 +82,7 @@ static void regmap_irq_enable(struct irq_data *data)
static void regmap_irq_disable(struct irq_data *data) static void regmap_irq_disable(struct irq_data *data)
{ {
struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data); struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
struct regmap *map = d->map;
const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq); const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq);
d->mask_buf[irq_data->reg_offset / map->reg_stride] |= irq_data->mask; d->mask_buf[irq_data->reg_offset / map->reg_stride] |= irq_data->mask;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册