regmap: Pass back the allocated regmap IRQ controller data
Mark Brown [Sun, 13 May 2012 10:18:34 +0000 (11:18 +0100)]
It's needed for freeing and for obtaining the IRQ base later on.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 2431d0a1d68aabefeee02b93971ee73e8b215697)

Change-Id: I65a92eaf3bff5935133d170259f093aeebd38a8a
Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Reviewed-on: http://git-master/r/127893
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Tested-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/base/regmap/regmap-irq.c

index d1234bc..7bac1bd 100644 (file)
@@ -194,6 +194,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)