Merge branch for-rmk-devel of git://aeryn.fluff.org.uk/bjdooks/linux into devel
[pandora-kernel.git] / arch / arm / plat-s3c / gpio.c
index d71dd6d..260fdc6 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
-#include <plat/gpio-core.h>
+#include <mach/gpio-core.h>
 
 #ifdef CONFIG_S3C_GPIO_TRACK
 struct s3c_gpio_chip *s3c_gpios[S3C_GPIO_END];
@@ -140,6 +140,15 @@ __init void s3c_gpiolib_add(struct s3c_gpio_chip *chip)
        if (!gc->get)
                gc->get = s3c_gpiolib_get;
 
+#ifdef CONFIG_PM
+       if (chip->pm != NULL) {
+               if (!chip->pm->save || !chip->pm->resume)
+                       printk(KERN_ERR "gpio: %s has missing PM functions\n",
+                              gc->label);
+       } else
+               printk(KERN_ERR "gpio: %s has no PM function\n", gc->label);
+#endif
+
        /* gpiochip_add() prints own failure message on error. */
        ret = gpiochip_add(gc);
        if (ret >= 0)