Skip to contentSkip to conversation

hwrng: exynos - add CONFIG_PM_SLEEP to suspend/resume functions

PATCH NAK Jingoo Han 3 participants 4 messages Mar 12, 2013 – Mar 21, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 hwrng: exynos - 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/char/hw_random/exynos-rng.c:147:12: warning: 'exynos_rng_runtime_suspend' defined but not used [-Wunused-function] drivers/char/hw_random/exynos-rng.c:157:12: warning: 'exynos_rng_runtime_resume' defined but not used [-Wunused-function]

---
 drivers/char/hw_random/exynos-rng.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/char/hw_random/exynos-rng.c +2 -1
index ac47631..b7e48a2 100644
@@ -144,6 +144,7 @@ static int exynos_rng_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int exynos_rng_runtime_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -161,7 +162,7 @@ static int exynos_rng_runtime_resume(struct device *dev)
 
 	return clk_prepare_enable(exynos_rng->clk);
 }
-
+#endif
 
 static UNIVERSAL_DEV_PM_OPS(exynos_rng_pm_ops, exynos_rng_runtime_suspend,
 					exynos_rng_runtime_resume, NULL);
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 7 lines · Jingoo Han

This patch adds CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected.

drivers/char/hw_random/exynos-rng.c:147:12: warning: 'exynos_rng_runtime_suspend' defined but not used [-Wunused-function] drivers/char/hw_random/exynos-rng.c:157:12: warning: 'exynos_rng_runtime_resume' defined but not used [-Wunused-function]

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw
Quoted 9 lines · Herbert Xu
Quoted 7 lines

This patch adds CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected.

drivers/char/hw_random/exynos-rng.c:147:12: warning: 'exynos_rng_runtime_suspend' defined but not used [-Wunused-function] drivers/char/hw_random/exynos-rng.c:157:12: warning: 'exynos_rng_runtime_resume' defined but not used [-Wunused-function]

Patch applied. Thanks.

Nack, it causes build errors when CONFIG_PM_SLEEP is disabled:

drivers/char/hw_random/exynos-rng.c:167:8: error: 'exynos_rng_runtime_suspend' undeclared here (not in a function) drivers/char/hw_random/exynos-rng.c:167:8: error: 'exynos_rng_runtime_resume' undeclared here (not in a function)

author
#3 lore raw
Quoted 13 lines · David Rientjes
Quoted 4 lines · Herbert Xu
Quoted 4 lines

This patch adds CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected.

drivers/char/hw_random/exynos-rng.c:147:12: warning: 'exynos_rng_runtime_suspend' defined but not

used [-Wunused-function]

Quoted 1 line
Quoted 1 line

drivers/char/hw_random/exynos-rng.c:157:12: warning: 'exynos_rng_runtime_resume' defined but not

used [-Wunused-function]

Quoted 3 lines
Quoted 2 lines
Quoted 8 lines
Quoted 1 line

Patch applied. Thanks.

Nack, it causes build errors when CONFIG_PM_SLEEP is disabled:

drivers/char/hw_random/exynos-rng.c:167:8: error: 'exynos_rng_runtime_suspend' undeclared here (not in a function)
drivers/char/hw_random/exynos-rng.c:167:8: error: 'exynos_rng_runtime_resume' undeclared here (not in a function)

OK, I see.

UNIVERSAL_DEV_PM_OPS is related to both CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME. Thus, CONFIG_PM_RUNTIME is also necessary.

I will send an additional patch, soon.

Best regards,
Jingoo Han