pinctrl: at91: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper
[linux-2.6-block.git] / drivers / pinctrl / pinctrl-at91.c
index 39956d821ad751b051b33416f7e3dd1dfd66b726..608f55c5ba5fe6190fc2df544045b538049d4ce8 100644 (file)
@@ -1657,7 +1657,7 @@ static int gpio_irq_set_wake(struct irq_data *d, unsigned state)
        return 0;
 }
 
-static int __maybe_unused at91_gpio_suspend(struct device *dev)
+static int at91_gpio_suspend(struct device *dev)
 {
        struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev);
        void __iomem *pio = at91_chip->regbase;
@@ -1675,7 +1675,7 @@ static int __maybe_unused at91_gpio_suspend(struct device *dev)
        return 0;
 }
 
-static int __maybe_unused at91_gpio_resume(struct device *dev)
+static int at91_gpio_resume(struct device *dev)
 {
        struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev);
        void __iomem *pio = at91_chip->regbase;
@@ -1903,15 +1903,13 @@ static int at91_gpio_probe(struct platform_device *pdev)
        return 0;
 }
 
-static const struct dev_pm_ops at91_gpio_pm_ops = {
-       NOIRQ_SYSTEM_SLEEP_PM_OPS(at91_gpio_suspend, at91_gpio_resume)
-};
+static DEFINE_NOIRQ_DEV_PM_OPS(at91_gpio_pm_ops, at91_gpio_suspend, at91_gpio_resume);
 
 static struct platform_driver at91_gpio_driver = {
        .driver = {
                .name = "gpio-at91",
                .of_match_table = at91_gpio_of_match,
-               .pm = pm_ptr(&at91_gpio_pm_ops),
+               .pm = pm_sleep_ptr(&at91_gpio_pm_ops),
        },
        .probe = at91_gpio_probe,
 };