hwrng: exynos - add CONFIG_PM_SLEEP to suspend/resume functions
Subsystems (2)
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
@@ -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
Quoted 7 lines · Jingoo Han
This patch adds
CONFIG_PM_SLEEPto suspend/resume functions to fix the following build warning whenCONFIG_PM_SLEEPis 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]Signed-off-by Jingoo Han <[email protected]>
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
David Rientjes
NAKQuoted 9 lines · Herbert Xu
Quoted 7 lines
This patch adds
CONFIG_PM_SLEEPto suspend/resume functions to fix the following build warning whenCONFIG_PM_SLEEPis 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]Signed-off-by Jingoo Han <[email protected]>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)
Quoted 13 lines · David Rientjes
Quoted 4 lines · Herbert Xu
Quoted 4 lines
This patch adds
CONFIG_PM_SLEEPto suspend/resume functions to fix the following build warning whenCONFIG_PM_SLEEPis not selected.
drivers/char/hw_random/exynos-rng.c:147:12: warning: 'exynos_rng_runtime_suspend' defined but notused [-Wunused-function]
Quoted 1 line
Quoted 1 line
drivers/char/hw_random/exynos-rng.c:157:12: warning: 'exynos_rng_runtime_resume' defined but notused [-Wunused-function]
Quoted 3 lines
Quoted 2 lines
Signed-off-by Jingoo Han <[email protected]>
Quoted 8 lines
Quoted 1 line
Patch applied. Thanks.
Nack, it causes build errors when
CONFIG_PM_SLEEPis 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