Merge branch 'fix/misc' into for-linus
[pandora-kernel.git] / drivers / gpio / pl061.c
index 4ee4c83..5ad8f77 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/device.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/pl061.h>
+#include <linux/slab.h>
 
 #define GPIODIR 0x400
 #define GPIOIS  0x404
@@ -219,7 +220,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
                if (pending == 0)
                        continue;
 
-               for_each_bit(offset, &pending, PL061_GPIO_NR)
+               for_each_set_bit(offset, &pending, PL061_GPIO_NR)
                        generic_handle_irq(pl061_to_irq(&chip->gc, offset));
        }
        desc->chip->unmask(irq);