mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hwrng: exynos - add CONFIG_PM_SLEEP to suspend/resume functions
@ 2013-03-12  5:46 Jingoo Han
  2013-03-21  9:54 ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Jingoo Han @ 2013-03-12  5:46 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Matt Mackall', 'Herbert Xu',
	'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]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/char/hw_random/exynos-rng.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c
index ac47631..b7e48a2 100644
--- a/drivers/char/hw_random/exynos-rng.c
+++ b/drivers/char/hw_random/exynos-rng.c
@@ -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);
-- 
1.7.2.5



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hwrng: exynos - add CONFIG_PM_SLEEP to suspend/resume functions
  2013-03-12  5:46 [PATCH] hwrng: exynos - add CONFIG_PM_SLEEP to suspend/resume functions Jingoo Han
@ 2013-03-21  9:54 ` Herbert Xu
  2013-03-21 19:17   ` David Rientjes
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2013-03-21  9:54 UTC (permalink / raw)
  To: Jingoo Han; +Cc: 'Andrew Morton', linux-kernel, 'Matt Mackall'

On Tue, Mar 12, 2013 at 02:46:22PM +0900, Jingoo Han wrote:
> 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]
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hwrng: exynos - add CONFIG_PM_SLEEP to suspend/resume functions
  2013-03-21  9:54 ` Herbert Xu
@ 2013-03-21 19:17   ` David Rientjes
  2013-03-21 23:18     ` Jingoo Han
  0 siblings, 1 reply; 4+ messages in thread
From: David Rientjes @ 2013-03-21 19:17 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Jingoo Han, Andrew Morton, linux-kernel, Matt Mackall

On Thu, 21 Mar 2013, Herbert Xu wrote:

> > 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]
> > 
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> 
> 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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hwrng: exynos - add CONFIG_PM_SLEEP to suspend/resume functions
  2013-03-21 19:17   ` David Rientjes
@ 2013-03-21 23:18     ` Jingoo Han
  0 siblings, 0 replies; 4+ messages in thread
From: Jingoo Han @ 2013-03-21 23:18 UTC (permalink / raw)
  To: 'David Rientjes', 'Herbert Xu'
  Cc: 'Andrew Morton', linux-kernel, 'Matt Mackall'

On Friday, March 22, 2013 4:17 AM, David Rientjes wrote:
> 
> On Thu, 21 Mar 2013, Herbert Xu wrote:
> 
> > > 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]
> > >
> > > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> >
> > 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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-21 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-12  5:46 [PATCH] hwrng: exynos - add CONFIG_PM_SLEEP to suspend/resume functions Jingoo Han
2013-03-21  9:54 ` Herbert Xu
2013-03-21 19:17   ` David Rientjes
2013-03-21 23:18     ` Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®