linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: s3c64xx: cpuidle: use init/exit common routine
@ 2013-04-23 14:41 Daniel Lezcano
  2013-04-23 14:41 ` [PATCH 2/2] SH: " Daniel Lezcano
  2013-04-25  9:35 ` [PATCH 1/2] ARM: s3c64xx: " Daniel Lezcano
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Lezcano @ 2013-04-23 14:41 UTC (permalink / raw)
  Cc: ben-linux, kgene.kim, horms+renesas, lethal, patches,
	linaro-kernel, linux-pm

Remove the duplicated code and use the cpuidle common code for initialization.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/mach-s3c64xx/cpuidle.c |   14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/cpuidle.c b/arch/arm/mach-s3c64xx/cpuidle.c
index 852ff16..3c8ab07 100644
--- a/arch/arm/mach-s3c64xx/cpuidle.c
+++ b/arch/arm/mach-s3c64xx/cpuidle.c
@@ -40,8 +40,6 @@ static int s3c64xx_enter_idle(struct cpuidle_device *dev,
 	return index;
 }
 
-static DEFINE_PER_CPU(struct cpuidle_device, s3c64xx_cpuidle_device);
-
 static struct cpuidle_driver s3c64xx_cpuidle_driver = {
 	.name	= "s3c64xx_cpuidle",
 	.owner  = THIS_MODULE,
@@ -60,16 +58,6 @@ static struct cpuidle_driver s3c64xx_cpuidle_driver = {
 
 static int __init s3c64xx_init_cpuidle(void)
 {
-	int ret;
-
-	cpuidle_register_driver(&s3c64xx_cpuidle_driver);
-
-	ret = cpuidle_register_device(&s3c64xx_cpuidle_device);
-	if (ret) {
-		pr_err("Failed to register cpuidle device: %d\n", ret);
-		return ret;
-	}
-
-	return 0;
+	return cpuidle_register(&s3c64xx_cpuidle_driver, NULL);
 }
 device_initcall(s3c64xx_init_cpuidle);
-- 
1.7.9.5


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

* [PATCH 2/2] SH: cpuidle: use init/exit common routine
  2013-04-23 14:41 [PATCH 1/2] ARM: s3c64xx: cpuidle: use init/exit common routine Daniel Lezcano
@ 2013-04-23 14:41 ` Daniel Lezcano
  2013-04-24  6:02   ` Simon Horman
  2013-04-25  9:35 ` [PATCH 1/2] ARM: s3c64xx: " Daniel Lezcano
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Lezcano @ 2013-04-23 14:41 UTC (permalink / raw)
  Cc: ben-linux, kgene.kim, horms+renesas, lethal, patches,
	linaro-kernel, linux-pm

Remove the duplicated code and use the cpuidle common code for initialization.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/sh/kernel/cpu/shmobile/cpuidle.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
index fdfe57f4..d306225 100644
--- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
+++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
@@ -51,7 +51,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
 	return k;
 }
 
-static struct cpuidle_device cpuidle_dev;
 static struct cpuidle_driver cpuidle_driver = {
 	.name   = "sh_idle",
 	.owner  = THIS_MODULE,
@@ -100,9 +99,5 @@ int __init sh_mobile_setup_cpuidle(void)
 	if (sh_mobile_sleep_supported & SUSP_SH_STANDBY)
 		cpuidle_driver.states[2].disabled = false;
 
-	ret = cpuidle_register_driver(&cpuidle_driver);
-	if (ret)
-		return ret;
-
-	return cpuidle_register_device(&cpuidle_dev);
+	return cpuidle_register(&cpuidle_driver);
 }
-- 
1.7.9.5


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

* Re: [PATCH 2/2] SH: cpuidle: use init/exit common routine
  2013-04-23 14:41 ` [PATCH 2/2] SH: " Daniel Lezcano
@ 2013-04-24  6:02   ` Simon Horman
  2013-04-24 12:08     ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Horman @ 2013-04-24  6:02 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: ben-linux, kgene.kim, lethal, patches, linaro-kernel, linux-pm

On Tue, Apr 23, 2013 at 04:41:17PM +0200, Daniel Lezcano wrote:
> Remove the duplicated code and use the cpuidle common code for initialization.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Acked-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  arch/sh/kernel/cpu/shmobile/cpuidle.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
> index fdfe57f4..d306225 100644
> --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
> +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
> @@ -51,7 +51,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
>  	return k;
>  }
>  
> -static struct cpuidle_device cpuidle_dev;
>  static struct cpuidle_driver cpuidle_driver = {
>  	.name   = "sh_idle",
>  	.owner  = THIS_MODULE,
> @@ -100,9 +99,5 @@ int __init sh_mobile_setup_cpuidle(void)
>  	if (sh_mobile_sleep_supported & SUSP_SH_STANDBY)
>  		cpuidle_driver.states[2].disabled = false;
>  
> -	ret = cpuidle_register_driver(&cpuidle_driver);
> -	if (ret)
> -		return ret;
> -
> -	return cpuidle_register_device(&cpuidle_dev);
> +	return cpuidle_register(&cpuidle_driver);
>  }
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 2/2] SH: cpuidle: use init/exit common routine
  2013-04-24  6:02   ` Simon Horman
@ 2013-04-24 12:08     ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2013-04-24 12:08 UTC (permalink / raw)
  To: Simon Horman
  Cc: Daniel Lezcano, ben-linux, kgene.kim, lethal, patches,
	linaro-kernel, linux-pm

On Wednesday, April 24, 2013 03:02:15 PM Simon Horman wrote:
> On Tue, Apr 23, 2013 at 04:41:17PM +0200, Daniel Lezcano wrote:
> > Remove the duplicated code and use the cpuidle common code for initialization.
> > 
> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> Acked-by: Simon Horman <horms+renesas@verge.net.au>

Applied.

Thanks,
Rafael


> > ---
> >  arch/sh/kernel/cpu/shmobile/cpuidle.c |    7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> > 
> > diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
> > index fdfe57f4..d306225 100644
> > --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
> > +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
> > @@ -51,7 +51,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
> >  	return k;
> >  }
> >  
> > -static struct cpuidle_device cpuidle_dev;
> >  static struct cpuidle_driver cpuidle_driver = {
> >  	.name   = "sh_idle",
> >  	.owner  = THIS_MODULE,
> > @@ -100,9 +99,5 @@ int __init sh_mobile_setup_cpuidle(void)
> >  	if (sh_mobile_sleep_supported & SUSP_SH_STANDBY)
> >  		cpuidle_driver.states[2].disabled = false;
> >  
> > -	ret = cpuidle_register_driver(&cpuidle_driver);
> > -	if (ret)
> > -		return ret;
> > -
> > -	return cpuidle_register_device(&cpuidle_dev);
> > +	return cpuidle_register(&cpuidle_driver);
> >  }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 1/2] ARM: s3c64xx: cpuidle: use init/exit common routine
  2013-04-23 14:41 [PATCH 1/2] ARM: s3c64xx: cpuidle: use init/exit common routine Daniel Lezcano
  2013-04-23 14:41 ` [PATCH 2/2] SH: " Daniel Lezcano
@ 2013-04-25  9:35 ` Daniel Lezcano
  2013-04-25 15:31   ` Kukjin Kim
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Lezcano @ 2013-04-25  9:35 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: linaro-kernel, patches, linux-pm, lethal, kgene.kim, ben-linux,
	horms+renesas, linux-samsung-soc,
	linux-arm-kernel@lists.infradead.org

On 04/23/2013 04:41 PM, Daniel Lezcano wrote:
> Remove the duplicated code and use the cpuidle common code for initialization.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---

Hi Kim and Ben,

It is the last patch in the series which was not acked-by.
Rafael is willing to take it in its tree if you ack it.

Are you ok if this patch ?

Thanks
-- Daniel

>  arch/arm/mach-s3c64xx/cpuidle.c |   14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/cpuidle.c b/arch/arm/mach-s3c64xx/cpuidle.c
> index 852ff16..3c8ab07 100644
> --- a/arch/arm/mach-s3c64xx/cpuidle.c
> +++ b/arch/arm/mach-s3c64xx/cpuidle.c
> @@ -40,8 +40,6 @@ static int s3c64xx_enter_idle(struct cpuidle_device *dev,
>  	return index;
>  }
>  
> -static DEFINE_PER_CPU(struct cpuidle_device, s3c64xx_cpuidle_device);
> -
>  static struct cpuidle_driver s3c64xx_cpuidle_driver = {
>  	.name	= "s3c64xx_cpuidle",
>  	.owner  = THIS_MODULE,
> @@ -60,16 +58,6 @@ static struct cpuidle_driver s3c64xx_cpuidle_driver = {
>  
>  static int __init s3c64xx_init_cpuidle(void)
>  {
> -	int ret;
> -
> -	cpuidle_register_driver(&s3c64xx_cpuidle_driver);
> -
> -	ret = cpuidle_register_device(&s3c64xx_cpuidle_device);
> -	if (ret) {
> -		pr_err("Failed to register cpuidle device: %d\n", ret);
> -		return ret;
> -	}
> -
> -	return 0;
> +	return cpuidle_register(&s3c64xx_cpuidle_driver, NULL);
>  }
>  device_initcall(s3c64xx_init_cpuidle);


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH 1/2] ARM: s3c64xx: cpuidle: use init/exit common routine
  2013-04-25  9:35 ` [PATCH 1/2] ARM: s3c64xx: " Daniel Lezcano
@ 2013-04-25 15:31   ` Kukjin Kim
  2013-04-26 12:03     ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Kukjin Kim @ 2013-04-25 15:31 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: linaro-kernel, patches, linux-pm, lethal, kgene.kim, ben-linux,
	horms+renesas, linux-samsung-soc,
	linux-arm-kernel@lists.infradead.org

On 04/25/13 18:35, Daniel Lezcano wrote:
> On 04/23/2013 04:41 PM, Daniel Lezcano wrote:
>> Remove the duplicated code and use the cpuidle common code for initialization.
>>
>> Signed-off-by: Daniel Lezcano<daniel.lezcano@linaro.org>
>> ---
>
> Hi Kim and Ben,
>
> It is the last patch in the series which was not acked-by.
> Rafael is willing to take it in its tree if you ack it.
>
> Are you ok if this patch ?
>
Looks OK to me, please go ahead with my ack if you want:

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

- Kukjin

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

* Re: [PATCH 1/2] ARM: s3c64xx: cpuidle: use init/exit common routine
  2013-04-25 15:31   ` Kukjin Kim
@ 2013-04-26 12:03     ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2013-04-26 12:03 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: Daniel Lezcano, linaro-kernel, patches, linux-pm, lethal,
	ben-linux, horms+renesas, linux-samsung-soc,
	linux-arm-kernel@lists.infradead.org

On Friday, April 26, 2013 12:31:01 AM Kukjin Kim wrote:
> On 04/25/13 18:35, Daniel Lezcano wrote:
> > On 04/23/2013 04:41 PM, Daniel Lezcano wrote:
> >> Remove the duplicated code and use the cpuidle common code for initialization.
> >>
> >> Signed-off-by: Daniel Lezcano<daniel.lezcano@linaro.org>
> >> ---
> >
> > Hi Kim and Ben,
> >
> > It is the last patch in the series which was not acked-by.
> > Rafael is willing to take it in its tree if you ack it.
> >
> > Are you ok if this patch ?
> >
> Looks OK to me, please go ahead with my ack if you want:
> 
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Applied.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

end of thread, other threads:[~2013-04-26 11:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23 14:41 [PATCH 1/2] ARM: s3c64xx: cpuidle: use init/exit common routine Daniel Lezcano
2013-04-23 14:41 ` [PATCH 2/2] SH: " Daniel Lezcano
2013-04-24  6:02   ` Simon Horman
2013-04-24 12:08     ` Rafael J. Wysocki
2013-04-25  9:35 ` [PATCH 1/2] ARM: s3c64xx: " Daniel Lezcano
2013-04-25 15:31   ` Kukjin Kim
2013-04-26 12:03     ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).