diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-03-10 22:12:58 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2013-03-11 03:28:22 -0400 |
commit | b78f5fc92a836259b69d49129c6c1cad9b03c322 (patch) | |
tree | a4004d4443cdb11c333eb9940fb411f3330339a2 /drivers/pwm | |
parent | c509a8e521939ca1fd4ba31feca4718328044230 (diff) |
pwm: pwm-tiecap: add CONFIG_PM_SLEEP to suspend/resume functions
This patch adds CONFIG_PM_SLEEP to suspend/resume functions to fix
the following build warning when CONFIG_PM_SLEEP is not selected.
drivers/pwm/pwm-tiecap.c:314:12: warning: 'ecap_pwm_suspend' defined but not used [-Wunused-function]
drivers/pwm/pwm-tiecap.c:328:12: warning: 'ecap_pwm_resume' defined but not used [-Wunused-function]
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-tiecap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c index 22e96e2bffd3..f024db06e6c4 100644 --- a/drivers/pwm/pwm-tiecap.c +++ b/drivers/pwm/pwm-tiecap.c | |||
@@ -311,6 +311,7 @@ void ecap_pwm_restore_context(struct ecap_pwm_chip *pc) | |||
311 | writew(pc->ctx.ecctl2, pc->mmio_base + ECCTL2); | 311 | writew(pc->ctx.ecctl2, pc->mmio_base + ECCTL2); |
312 | } | 312 | } |
313 | 313 | ||
314 | #ifdef CONFIG_PM_SLEEP | ||
314 | static int ecap_pwm_suspend(struct device *dev) | 315 | static int ecap_pwm_suspend(struct device *dev) |
315 | { | 316 | { |
316 | struct ecap_pwm_chip *pc = dev_get_drvdata(dev); | 317 | struct ecap_pwm_chip *pc = dev_get_drvdata(dev); |
@@ -337,6 +338,7 @@ static int ecap_pwm_resume(struct device *dev) | |||
337 | ecap_pwm_restore_context(pc); | 338 | ecap_pwm_restore_context(pc); |
338 | return 0; | 339 | return 0; |
339 | } | 340 | } |
341 | #endif | ||
340 | 342 | ||
341 | static SIMPLE_DEV_PM_OPS(ecap_pwm_pm_ops, ecap_pwm_suspend, ecap_pwm_resume); | 343 | static SIMPLE_DEV_PM_OPS(ecap_pwm_pm_ops, ecap_pwm_suspend, ecap_pwm_resume); |
342 | 344 | ||