/* the interrupt is already cleared before by reading ISR */
 }
 
-#ifdef CONFIG_PM
-
 static u32 wakeups[MAX_GPIO_BANKS];
 static u32 backups[MAX_GPIO_BANKS];
 
        }
 }
 
-#else
-#define gpio_irq_set_wake      NULL
-#endif /* CONFIG_PM */
-
 static void gpio_irq_handler(struct irq_desc *desc)
 {
        struct irq_chip *chip = irq_desc_get_chip(desc);
        gpio_irqchip->irq_disable = gpio_irq_mask;
        gpio_irqchip->irq_mask = gpio_irq_mask;
        gpio_irqchip->irq_unmask = gpio_irq_unmask;
-       gpio_irqchip->irq_set_wake = gpio_irq_set_wake;
+       gpio_irqchip->irq_set_wake = pm_ptr(gpio_irq_set_wake);
        gpio_irqchip->irq_set_type = at91_gpio->ops->irq_type;
 
        /* Disable irqs of this PIO controller */