struct regmap_irq_chip_data {
struct mutex lock;
+ struct irq_chip irq_chip;
struct regmap *map;
const struct regmap_irq_chip *chip;
return 0;
}
-static struct irq_chip regmap_irq_chip = {
+static const struct irq_chip regmap_irq_chip = {
.name = "regmap",
.irq_bus_lock = regmap_irq_lock,
.irq_bus_sync_unlock = regmap_irq_sync_unlock,
struct regmap_irq_chip_data *data = h->host_data;
irq_set_chip_data(virq, data);
- irq_set_chip_and_handler(virq, ®map_irq_chip, handle_edge_irq);
+ irq_set_chip_and_handler(virq, &data->irq_chip, handle_edge_irq);
irq_set_nested_thread(virq, 1);
/* ARM needs us to explicitly flag the IRQ as valid
goto err_alloc;
}
+ d->irq_chip = regmap_irq_chip;
d->irq = irq;
d->map = map;
d->chip = chip;