diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-08-01 13:40:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-04 07:13:53 -0400 |
commit | 7ac140ec426ed304237205be77f99eedfc1186b5 (patch) | |
tree | 43a4a068d1fef340215301a05ea9ba93c9fe6ccc /drivers/base/regmap | |
parent | 0eb46ad0c8d60943c1f46cef795fc537fbffd177 (diff) |
regmap: store irq_chip inside regmap_irq_chip_data
This will allow later patches to adjust portions of the irq_chip
individually for each regmap_irq_chip that is created.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 4a52743b60cd..72a6f31e8223 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | struct regmap_irq_chip_data { | 23 | struct regmap_irq_chip_data { |
24 | struct mutex lock; | 24 | struct mutex lock; |
25 | struct irq_chip irq_chip; | ||
25 | 26 | ||
26 | struct regmap *map; | 27 | struct regmap *map; |
27 | const struct regmap_irq_chip *chip; | 28 | const struct regmap_irq_chip *chip; |
@@ -129,7 +130,7 @@ static int regmap_irq_set_wake(struct irq_data *data, unsigned int on) | |||
129 | return 0; | 130 | return 0; |
130 | } | 131 | } |
131 | 132 | ||
132 | static struct irq_chip regmap_irq_chip = { | 133 | static const struct irq_chip regmap_irq_chip = { |
133 | .name = "regmap", | 134 | .name = "regmap", |
134 | .irq_bus_lock = regmap_irq_lock, | 135 | .irq_bus_lock = regmap_irq_lock, |
135 | .irq_bus_sync_unlock = regmap_irq_sync_unlock, | 136 | .irq_bus_sync_unlock = regmap_irq_sync_unlock, |
@@ -197,7 +198,7 @@ static int regmap_irq_map(struct irq_domain *h, unsigned int virq, | |||
197 | struct regmap_irq_chip_data *data = h->host_data; | 198 | struct regmap_irq_chip_data *data = h->host_data; |
198 | 199 | ||
199 | irq_set_chip_data(virq, data); | 200 | irq_set_chip_data(virq, data); |
200 | irq_set_chip_and_handler(virq, ®map_irq_chip, handle_edge_irq); | 201 | irq_set_chip_and_handler(virq, &data->irq_chip, handle_edge_irq); |
201 | irq_set_nested_thread(virq, 1); | 202 | irq_set_nested_thread(virq, 1); |
202 | 203 | ||
203 | /* ARM needs us to explicitly flag the IRQ as valid | 204 | /* ARM needs us to explicitly flag the IRQ as valid |
@@ -285,6 +286,7 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags, | |||
285 | goto err_alloc; | 286 | goto err_alloc; |
286 | } | 287 | } |
287 | 288 | ||
289 | d->irq_chip = regmap_irq_chip; | ||
288 | d->irq = irq; | 290 | d->irq = irq; |
289 | d->map = map; | 291 | d->map = map; |
290 | d->chip = chip; | 292 | d->chip = chip; |