diff options
author | Wolfram Sang <wsa@sang-engineering.com> | 2014-04-02 07:56:21 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2014-05-21 05:51:26 -0400 |
commit | af5935ec125ef85823ea43fbcfdd3c15b532d199 (patch) | |
tree | 93f9c2d28ab4a592723e13b6c1a60092756c2c0f | |
parent | 16fc3352ea58b481f879f8d965b98208ccc279c2 (diff) |
pwm: tiehrpwm: don't build PM related functions when not needed
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>
-rw-r--r-- | drivers/pwm/pwm-tiehrpwm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c index 3a31c08cc6c8..f5e371dc4e50 100644 --- a/drivers/pwm/pwm-tiehrpwm.c +++ b/drivers/pwm/pwm-tiehrpwm.c | |||
@@ -529,6 +529,7 @@ static int ehrpwm_pwm_remove(struct platform_device *pdev) | |||
529 | return pwmchip_remove(&pc->chip); | 529 | return pwmchip_remove(&pc->chip); |
530 | } | 530 | } |
531 | 531 | ||
532 | #ifdef CONFIG_PM_SLEEP | ||
532 | static void ehrpwm_pwm_save_context(struct ehrpwm_pwm_chip *pc) | 533 | static void ehrpwm_pwm_save_context(struct ehrpwm_pwm_chip *pc) |
533 | { | 534 | { |
534 | pm_runtime_get_sync(pc->chip.dev); | 535 | pm_runtime_get_sync(pc->chip.dev); |
@@ -555,7 +556,6 @@ static void ehrpwm_pwm_restore_context(struct ehrpwm_pwm_chip *pc) | |||
555 | ehrpwm_write(pc->mmio_base, TBCTL, pc->ctx.tbctl); | 556 | ehrpwm_write(pc->mmio_base, TBCTL, pc->ctx.tbctl); |
556 | } | 557 | } |
557 | 558 | ||
558 | #ifdef CONFIG_PM_SLEEP | ||
559 | static int ehrpwm_pwm_suspend(struct device *dev) | 559 | static int ehrpwm_pwm_suspend(struct device *dev) |
560 | { | 560 | { |
561 | struct ehrpwm_pwm_chip *pc = dev_get_drvdata(dev); | 561 | struct ehrpwm_pwm_chip *pc = dev_get_drvdata(dev); |