regmap: Pass back the allocated regmap IRQ controller data
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 13 May 2012 10:18:34 +0000 (11:18 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 13 May 2012 18:16:13 +0000 (19:16 +0100)
It's needed for freeing and for obtaining the IRQ base later on.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/regmap-irq.c

index 1befaa7a31cbdeacb76a7a67f17540799f523d6b..f4e6dcfc85048715cf8f2d12d07810d592cc2a38 100644 (file)
@@ -192,6 +192,8 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
        if (!d)
                return -ENOMEM;
 
+       *data = d;
+
        d->status_buf = kzalloc(sizeof(unsigned int) * chip->num_regs,
                                GFP_KERNEL);
        if (!d->status_buf)