pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 13 Oct 2015 14:51:26 +0000 (17:51 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 16 Oct 2015 20:54:33 +0000 (22:54 +0200)
When CONFIG_PM is not set we get following compilation warnings:

 warning: â€˜byt_gpio_runtime_suspend’ defined but not used [-Wunused-function]
 warning: â€˜byt_gpio_runtime_resume’ defined but not used [-Wunused-function]

Fix this by guarding byt_gpio_runtime_suspend()/byt_gpio_runtime_resume()
with #ifdef CONFIG_PM.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/intel/pinctrl-baytrail.c

index f79ea43..b59ce75 100644 (file)
@@ -696,6 +696,7 @@ static int byt_gpio_resume(struct device *dev)
 }
 #endif
 
+#ifdef CONFIG_PM
 static int byt_gpio_runtime_suspend(struct device *dev)
 {
        return 0;
@@ -705,6 +706,7 @@ static int byt_gpio_runtime_resume(struct device *dev)
 {
        return 0;
 }
+#endif
 
 static const struct dev_pm_ops byt_gpio_pm_ops = {
        SET_LATE_SYSTEM_SLEEP_PM_OPS(byt_gpio_suspend, byt_gpio_resume)