pwm: tiehrpwm: don't build PM related functions when not needed
authorWolfram Sang <wsa@sang-engineering.com>
Wed, 2 Apr 2014 11:56:21 +0000 (13:56 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 21 May 2014 09:51:26 +0000 (11:51 +0200)
Fixes following warnings on AM335X with no PM_SLEEP

drivers/pwm/pwm-tiehrpwm.c:534:13: warning: 'ehrpwm_pwm_save_context' defined but not used [-Wunused-function]
drivers/pwm/pwm-tiehrpwm.c:548:13: warning: 'ehrpwm_pwm_restore_context' defined but not used [-Wunused-function]

Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-tiehrpwm.c

index 3a31c08cc6c854f0420c292c36e5a36096fc6f0f..f5e371dc4e504d33ff506816c86e1a90b62341bb 100644 (file)
@@ -529,6 +529,7 @@ static int ehrpwm_pwm_remove(struct platform_device *pdev)
        return pwmchip_remove(&pc->chip);
 }
 
+#ifdef CONFIG_PM_SLEEP
 static void ehrpwm_pwm_save_context(struct ehrpwm_pwm_chip *pc)
 {
        pm_runtime_get_sync(pc->chip.dev);
@@ -555,7 +556,6 @@ static void ehrpwm_pwm_restore_context(struct ehrpwm_pwm_chip *pc)
        ehrpwm_write(pc->mmio_base, TBCTL, pc->ctx.tbctl);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int ehrpwm_pwm_suspend(struct device *dev)
 {
        struct ehrpwm_pwm_chip *pc = dev_get_drvdata(dev);