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 1befaa7..f4e6dcf 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)