linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] cpuidle : remove unused ref count function
@ 2012-09-19 17:22 Daniel Lezcano
  2012-09-19 17:22 ` [PATCH 2/3] cpuidle : rename function name "__cpuidle_register_driver" Daniel Lezcano
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Daniel Lezcano @ 2012-09-19 17:22 UTC (permalink / raw)
  To: rjw, lenb; +Cc: linux-pm, linux-acpi, patches, linaro-dev

These two functions are never used.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/cpuidle/driver.c |   29 +----------------------------
 include/linux/cpuidle.h  |    4 ----
 2 files changed, 1 insertions(+), 32 deletions(-)

diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 58bf3b1..40cd3f3 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -16,7 +16,6 @@
 
 static struct cpuidle_driver *cpuidle_curr_driver;
 DEFINE_SPINLOCK(cpuidle_driver_lock);
-int cpuidle_driver_refcount;
 
 static void __cpuidle_register_driver(struct cpuidle_driver *drv)
 {
@@ -90,34 +89,8 @@ void cpuidle_unregister_driver(struct cpuidle_driver *drv)
 	}
 
 	spin_lock(&cpuidle_driver_lock);
-
-	if (!WARN_ON(cpuidle_driver_refcount > 0))
-		cpuidle_curr_driver = NULL;
-
+	cpuidle_curr_driver = NULL;
 	spin_unlock(&cpuidle_driver_lock);
 }
 
 EXPORT_SYMBOL_GPL(cpuidle_unregister_driver);
-
-struct cpuidle_driver *cpuidle_driver_ref(void)
-{
-	struct cpuidle_driver *drv;
-
-	spin_lock(&cpuidle_driver_lock);
-
-	drv = cpuidle_curr_driver;
-	cpuidle_driver_refcount++;
-
-	spin_unlock(&cpuidle_driver_lock);
-	return drv;
-}
-
-void cpuidle_driver_unref(void)
-{
-	spin_lock(&cpuidle_driver_lock);
-
-	if (!WARN_ON(cpuidle_driver_refcount <= 0))
-		cpuidle_driver_refcount--;
-
-	spin_unlock(&cpuidle_driver_lock);
-}
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 279b1ea..5abf62b 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -145,8 +145,6 @@ extern void disable_cpuidle(void);
 extern int cpuidle_idle_call(void);
 extern int cpuidle_register_driver(struct cpuidle_driver *drv);
 extern struct cpuidle_driver *cpuidle_get_driver(void);
-extern struct cpuidle_driver *cpuidle_driver_ref(void);
-extern void cpuidle_driver_unref(void);
 extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
 extern int cpuidle_register_device(struct cpuidle_device *dev);
 extern void cpuidle_unregister_device(struct cpuidle_device *dev);
@@ -169,8 +167,6 @@ static inline int cpuidle_idle_call(void) { return -ENODEV; }
 static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
 {return -ENODEV; }
 static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
-static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; }
-static inline void cpuidle_driver_unref(void) {}
 static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
 static inline int cpuidle_register_device(struct cpuidle_device *dev)
 {return -ENODEV; }
-- 
1.7.5.4


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

* [PATCH 2/3] cpuidle : rename function name "__cpuidle_register_driver"
  2012-09-19 17:22 [PATCH 1/3] cpuidle : remove unused ref count function Daniel Lezcano
@ 2012-09-19 17:22 ` Daniel Lezcano
  2012-09-19 19:51   ` Rafael J. Wysocki
  2012-09-19 17:22 ` [PATCH 3/3] cpuidle : remove trailing carriage return Daniel Lezcano
  2012-09-19 19:49 ` [PATCH 1/3] cpuidle : remove unused ref count function Rafael J. Wysocki
  2 siblings, 1 reply; 8+ messages in thread
From: Daniel Lezcano @ 2012-09-19 17:22 UTC (permalink / raw)
  To: rjw, lenb; +Cc: linux-pm, linux-acpi, patches, linaro-dev

Clarify the purpose of the function by changing its name and
move the condition out of this function.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/cpuidle/driver.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 40cd3f3..774d2cb 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -17,9 +17,10 @@
 static struct cpuidle_driver *cpuidle_curr_driver;
 DEFINE_SPINLOCK(cpuidle_driver_lock);
 
-static void __cpuidle_register_driver(struct cpuidle_driver *drv)
+static void set_power_states(struct cpuidle_driver *drv)
 {
 	int i;
+
 	/*
 	 * cpuidle driver should set the drv->power_specified bit
 	 * before registering if the driver provides
@@ -34,10 +35,8 @@ static void __cpuidle_register_driver(struct cpuidle_driver *drv)
 	 * an power value of -1.  So we use -2, -3, etc, for other
 	 * c-states.
 	 */
-	if (!drv->power_specified) {
-		for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++)
-			drv->states[i].power_usage = -1 - i;
-	}
+	for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++)
+		drv->states[i].power_usage = -1 - i;
 }
 
 
@@ -58,8 +57,10 @@ int cpuidle_register_driver(struct cpuidle_driver *drv)
 		spin_unlock(&cpuidle_driver_lock);
 		return -EBUSY;
 	}
-	__cpuidle_register_driver(drv);
-	cpuidle_curr_driver = drv;
+
+	if (!drv->power_specified)
+		set_power_states(drv);
+
 	spin_unlock(&cpuidle_driver_lock);
 
 	return 0;
-- 
1.7.5.4


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

* [PATCH 3/3] cpuidle : remove trailing carriage return
  2012-09-19 17:22 [PATCH 1/3] cpuidle : remove unused ref count function Daniel Lezcano
  2012-09-19 17:22 ` [PATCH 2/3] cpuidle : rename function name "__cpuidle_register_driver" Daniel Lezcano
@ 2012-09-19 17:22 ` Daniel Lezcano
  2012-09-19 20:16   ` Rafael J. Wysocki
  2012-09-19 19:49 ` [PATCH 1/3] cpuidle : remove unused ref count function Rafael J. Wysocki
  2 siblings, 1 reply; 8+ messages in thread
From: Daniel Lezcano @ 2012-09-19 17:22 UTC (permalink / raw)
  To: rjw, lenb; +Cc: linux-pm, linux-acpi, patches, linaro-dev

This mindless patch is just about removing some trailing
carriage returns.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/cpuidle/driver.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 774d2cb..fc8bfc2 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -39,7 +39,6 @@ static void set_power_states(struct cpuidle_driver *drv)
 		drv->states[i].power_usage = -1 - i;
 }
 
-
 /**
  * cpuidle_register_driver - registers a driver
  * @drv: the driver
@@ -65,7 +64,6 @@ int cpuidle_register_driver(struct cpuidle_driver *drv)
 
 	return 0;
 }
-
 EXPORT_SYMBOL_GPL(cpuidle_register_driver);
 
 /**
@@ -93,5 +91,4 @@ void cpuidle_unregister_driver(struct cpuidle_driver *drv)
 	cpuidle_curr_driver = NULL;
 	spin_unlock(&cpuidle_driver_lock);
 }
-
 EXPORT_SYMBOL_GPL(cpuidle_unregister_driver);
-- 
1.7.5.4


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

* Re: [PATCH 1/3] cpuidle : remove unused ref count function
  2012-09-19 17:22 [PATCH 1/3] cpuidle : remove unused ref count function Daniel Lezcano
  2012-09-19 17:22 ` [PATCH 2/3] cpuidle : rename function name "__cpuidle_register_driver" Daniel Lezcano
  2012-09-19 17:22 ` [PATCH 3/3] cpuidle : remove trailing carriage return Daniel Lezcano
@ 2012-09-19 19:49 ` Rafael J. Wysocki
  2012-09-19 19:56   ` Daniel Lezcano
  2 siblings, 1 reply; 8+ messages in thread
From: Rafael J. Wysocki @ 2012-09-19 19:49 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: lenb, linux-pm, linux-acpi, patches, linaro-dev

On Wednesday, September 19, 2012, Daniel Lezcano wrote:
> These two functions are never used.

This is not the case.  pm_genpd_attach_cpuidle() and
pm_genpd_detach_cpuidle() use them.

Please be more careful.

Thanks,
Rafael


> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  drivers/cpuidle/driver.c |   29 +----------------------------
>  include/linux/cpuidle.h  |    4 ----
>  2 files changed, 1 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
> index 58bf3b1..40cd3f3 100644
> --- a/drivers/cpuidle/driver.c
> +++ b/drivers/cpuidle/driver.c
> @@ -16,7 +16,6 @@
>  
>  static struct cpuidle_driver *cpuidle_curr_driver;
>  DEFINE_SPINLOCK(cpuidle_driver_lock);
> -int cpuidle_driver_refcount;
>  
>  static void __cpuidle_register_driver(struct cpuidle_driver *drv)
>  {
> @@ -90,34 +89,8 @@ void cpuidle_unregister_driver(struct cpuidle_driver *drv)
>  	}
>  
>  	spin_lock(&cpuidle_driver_lock);
> -
> -	if (!WARN_ON(cpuidle_driver_refcount > 0))
> -		cpuidle_curr_driver = NULL;
> -
> +	cpuidle_curr_driver = NULL;
>  	spin_unlock(&cpuidle_driver_lock);
>  }
>  
>  EXPORT_SYMBOL_GPL(cpuidle_unregister_driver);
> -
> -struct cpuidle_driver *cpuidle_driver_ref(void)
> -{
> -	struct cpuidle_driver *drv;
> -
> -	spin_lock(&cpuidle_driver_lock);
> -
> -	drv = cpuidle_curr_driver;
> -	cpuidle_driver_refcount++;
> -
> -	spin_unlock(&cpuidle_driver_lock);
> -	return drv;
> -}
> -
> -void cpuidle_driver_unref(void)
> -{
> -	spin_lock(&cpuidle_driver_lock);
> -
> -	if (!WARN_ON(cpuidle_driver_refcount <= 0))
> -		cpuidle_driver_refcount--;
> -
> -	spin_unlock(&cpuidle_driver_lock);
> -}
> diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
> index 279b1ea..5abf62b 100644
> --- a/include/linux/cpuidle.h
> +++ b/include/linux/cpuidle.h
> @@ -145,8 +145,6 @@ extern void disable_cpuidle(void);
>  extern int cpuidle_idle_call(void);
>  extern int cpuidle_register_driver(struct cpuidle_driver *drv);
>  extern struct cpuidle_driver *cpuidle_get_driver(void);
> -extern struct cpuidle_driver *cpuidle_driver_ref(void);
> -extern void cpuidle_driver_unref(void);
>  extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
>  extern int cpuidle_register_device(struct cpuidle_device *dev);
>  extern void cpuidle_unregister_device(struct cpuidle_device *dev);
> @@ -169,8 +167,6 @@ static inline int cpuidle_idle_call(void) { return -ENODEV; }
>  static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
>  {return -ENODEV; }
>  static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
> -static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; }
> -static inline void cpuidle_driver_unref(void) {}
>  static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
>  static inline int cpuidle_register_device(struct cpuidle_device *dev)
>  {return -ENODEV; }
> 


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

* Re: [PATCH 2/3] cpuidle : rename function name "__cpuidle_register_driver"
  2012-09-19 17:22 ` [PATCH 2/3] cpuidle : rename function name "__cpuidle_register_driver" Daniel Lezcano
@ 2012-09-19 19:51   ` Rafael J. Wysocki
  2012-09-19 20:00     ` Daniel Lezcano
  0 siblings, 1 reply; 8+ messages in thread
From: Rafael J. Wysocki @ 2012-09-19 19:51 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: lenb, linux-pm, linux-acpi, patches, linaro-dev

On Wednesday, September 19, 2012, Daniel Lezcano wrote:
> Clarify the purpose of the function by changing its name and
> move the condition out of this function.

Why exactly are you removing the condition?

Rafael


> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  drivers/cpuidle/driver.c |   15 ++++++++-------
>  1 files changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
> index 40cd3f3..774d2cb 100644
> --- a/drivers/cpuidle/driver.c
> +++ b/drivers/cpuidle/driver.c
> @@ -17,9 +17,10 @@
>  static struct cpuidle_driver *cpuidle_curr_driver;
>  DEFINE_SPINLOCK(cpuidle_driver_lock);
>  
> -static void __cpuidle_register_driver(struct cpuidle_driver *drv)
> +static void set_power_states(struct cpuidle_driver *drv)
>  {
>  	int i;
> +
>  	/*
>  	 * cpuidle driver should set the drv->power_specified bit
>  	 * before registering if the driver provides
> @@ -34,10 +35,8 @@ static void __cpuidle_register_driver(struct cpuidle_driver *drv)
>  	 * an power value of -1.  So we use -2, -3, etc, for other
>  	 * c-states.
>  	 */
> -	if (!drv->power_specified) {
> -		for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++)
> -			drv->states[i].power_usage = -1 - i;
> -	}
> +	for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++)
> +		drv->states[i].power_usage = -1 - i;
>  }
>  
>  
> @@ -58,8 +57,10 @@ int cpuidle_register_driver(struct cpuidle_driver *drv)
>  		spin_unlock(&cpuidle_driver_lock);
>  		return -EBUSY;
>  	}
> -	__cpuidle_register_driver(drv);
> -	cpuidle_curr_driver = drv;
> +
> +	if (!drv->power_specified)
> +		set_power_states(drv);
> +
>  	spin_unlock(&cpuidle_driver_lock);
>  
>  	return 0;
> 


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

* Re: [PATCH 1/3] cpuidle : remove unused ref count function
  2012-09-19 19:49 ` [PATCH 1/3] cpuidle : remove unused ref count function Rafael J. Wysocki
@ 2012-09-19 19:56   ` Daniel Lezcano
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2012-09-19 19:56 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-acpi, linux-pm, linaro-dev, patches, lenb

On 09/19/2012 09:49 PM, Rafael J. Wysocki wrote:
> On Wednesday, September 19, 2012, Daniel Lezcano wrote:
>> These two functions are never used.
> This is not the case.  pm_genpd_attach_cpuidle() and
> pm_genpd_detach_cpuidle() use them.
>
> Please be more careful.

Oops, sorry.

>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>>  drivers/cpuidle/driver.c |   29 +----------------------------
>>  include/linux/cpuidle.h  |    4 ----
>>  2 files changed, 1 insertions(+), 32 deletions(-)
>>
>> diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
>> index 58bf3b1..40cd3f3 100644
>> --- a/drivers/cpuidle/driver.c
>> +++ b/drivers/cpuidle/driver.c
>> @@ -16,7 +16,6 @@
>>  
>>  static struct cpuidle_driver *cpuidle_curr_driver;
>>  DEFINE_SPINLOCK(cpuidle_driver_lock);
>> -int cpuidle_driver_refcount;
>>  
>>  static void __cpuidle_register_driver(struct cpuidle_driver *drv)
>>  {
>> @@ -90,34 +89,8 @@ void cpuidle_unregister_driver(struct cpuidle_driver *drv)
>>  	}
>>  
>>  	spin_lock(&cpuidle_driver_lock);
>> -
>> -	if (!WARN_ON(cpuidle_driver_refcount > 0))
>> -		cpuidle_curr_driver = NULL;
>> -
>> +	cpuidle_curr_driver = NULL;
>>  	spin_unlock(&cpuidle_driver_lock);
>>  }
>>  
>>  EXPORT_SYMBOL_GPL(cpuidle_unregister_driver);
>> -
>> -struct cpuidle_driver *cpuidle_driver_ref(void)
>> -{
>> -	struct cpuidle_driver *drv;
>> -
>> -	spin_lock(&cpuidle_driver_lock);
>> -
>> -	drv = cpuidle_curr_driver;
>> -	cpuidle_driver_refcount++;
>> -
>> -	spin_unlock(&cpuidle_driver_lock);
>> -	return drv;
>> -}
>> -
>> -void cpuidle_driver_unref(void)
>> -{
>> -	spin_lock(&cpuidle_driver_lock);
>> -
>> -	if (!WARN_ON(cpuidle_driver_refcount <= 0))
>> -		cpuidle_driver_refcount--;
>> -
>> -	spin_unlock(&cpuidle_driver_lock);
>> -}
>> diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
>> index 279b1ea..5abf62b 100644
>> --- a/include/linux/cpuidle.h
>> +++ b/include/linux/cpuidle.h
>> @@ -145,8 +145,6 @@ extern void disable_cpuidle(void);
>>  extern int cpuidle_idle_call(void);
>>  extern int cpuidle_register_driver(struct cpuidle_driver *drv);
>>  extern struct cpuidle_driver *cpuidle_get_driver(void);
>> -extern struct cpuidle_driver *cpuidle_driver_ref(void);
>> -extern void cpuidle_driver_unref(void);
>>  extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
>>  extern int cpuidle_register_device(struct cpuidle_device *dev);
>>  extern void cpuidle_unregister_device(struct cpuidle_device *dev);
>> @@ -169,8 +167,6 @@ static inline int cpuidle_idle_call(void) { return -ENODEV; }
>>  static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
>>  {return -ENODEV; }
>>  static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
>> -static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; }
>> -static inline void cpuidle_driver_unref(void) {}
>>  static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
>>  static inline int cpuidle_register_device(struct cpuidle_device *dev)
>>  {return -ENODEV; }
>>
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>


-- 
 <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


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/3] cpuidle : rename function name "__cpuidle_register_driver"
  2012-09-19 19:51   ` Rafael J. Wysocki
@ 2012-09-19 20:00     ` Daniel Lezcano
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2012-09-19 20:00 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-acpi, linux-pm, linaro-dev, patches, lenb

On 09/19/2012 09:51 PM, Rafael J. Wysocki wrote:
> On Wednesday, September 19, 2012, Daniel Lezcano wrote:
>> Clarify the purpose of the function by changing its name and
>> move the condition out of this function.
> Why exactly are you removing the condition?

I just moved the condition out from the function and called it when the
condition is true.

	if (!drv->power_specified)
		set_power_states(drv);


But please, drop this patch too. I noticed there is an overlap with the
next patch I have in my series but not published.

Accidentally I removed "cpuidle_curr_driver = drv;"

Sorry for the inconvenience. Time for me to go to bed :)



>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>>  drivers/cpuidle/driver.c |   15 ++++++++-------
>>  1 files changed, 8 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
>> index 40cd3f3..774d2cb 100644
>> --- a/drivers/cpuidle/driver.c
>> +++ b/drivers/cpuidle/driver.c
>> @@ -17,9 +17,10 @@
>>  static struct cpuidle_driver *cpuidle_curr_driver;
>>  DEFINE_SPINLOCK(cpuidle_driver_lock);
>>  
>> -static void __cpuidle_register_driver(struct cpuidle_driver *drv)
>> +static void set_power_states(struct cpuidle_driver *drv)
>>  {
>>  	int i;
>> +
>>  	/*
>>  	 * cpuidle driver should set the drv->power_specified bit
>>  	 * before registering if the driver provides
>> @@ -34,10 +35,8 @@ static void __cpuidle_register_driver(struct cpuidle_driver *drv)
>>  	 * an power value of -1.  So we use -2, -3, etc, for other
>>  	 * c-states.
>>  	 */
>> -	if (!drv->power_specified) {
>> -		for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++)
>> -			drv->states[i].power_usage = -1 - i;
>> -	}
>> +	for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++)
>> +		drv->states[i].power_usage = -1 - i;
>>  }
>>  
>>  
>> @@ -58,8 +57,10 @@ int cpuidle_register_driver(struct cpuidle_driver *drv)
>>  		spin_unlock(&cpuidle_driver_lock);
>>  		return -EBUSY;
>>  	}
>> -	__cpuidle_register_driver(drv);
>> -	cpuidle_curr_driver = drv;
>> +
>> +	if (!drv->power_specified)
>> +		set_power_states(drv);
>> +
>>  	spin_unlock(&cpuidle_driver_lock);
>>  
>>  	return 0;
>>
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>


-- 
 <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


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 3/3] cpuidle : remove trailing carriage return
  2012-09-19 17:22 ` [PATCH 3/3] cpuidle : remove trailing carriage return Daniel Lezcano
@ 2012-09-19 20:16   ` Rafael J. Wysocki
  0 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2012-09-19 20:16 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: lenb, linux-pm, linux-acpi, patches, linaro-dev

On Wednesday, September 19, 2012, Daniel Lezcano wrote:
> This mindless patch is just about removing some trailing
> carriage returns.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Applied.

Thanks,
Rafael


> ---
>  drivers/cpuidle/driver.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
> index 774d2cb..fc8bfc2 100644
> --- a/drivers/cpuidle/driver.c
> +++ b/drivers/cpuidle/driver.c
> @@ -39,7 +39,6 @@ static void set_power_states(struct cpuidle_driver *drv)
>  		drv->states[i].power_usage = -1 - i;
>  }
>  
> -
>  /**
>   * cpuidle_register_driver - registers a driver
>   * @drv: the driver
> @@ -65,7 +64,6 @@ int cpuidle_register_driver(struct cpuidle_driver *drv)
>  
>  	return 0;
>  }
> -
>  EXPORT_SYMBOL_GPL(cpuidle_register_driver);
>  
>  /**
> @@ -93,5 +91,4 @@ void cpuidle_unregister_driver(struct cpuidle_driver *drv)
>  	cpuidle_curr_driver = NULL;
>  	spin_unlock(&cpuidle_driver_lock);
>  }
> -
>  EXPORT_SYMBOL_GPL(cpuidle_unregister_driver);
> 


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

end of thread, other threads:[~2012-09-19 20:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19 17:22 [PATCH 1/3] cpuidle : remove unused ref count function Daniel Lezcano
2012-09-19 17:22 ` [PATCH 2/3] cpuidle : rename function name "__cpuidle_register_driver" Daniel Lezcano
2012-09-19 19:51   ` Rafael J. Wysocki
2012-09-19 20:00     ` Daniel Lezcano
2012-09-19 17:22 ` [PATCH 3/3] cpuidle : remove trailing carriage return Daniel Lezcano
2012-09-19 20:16   ` Rafael J. Wysocki
2012-09-19 19:49 ` [PATCH 1/3] cpuidle : remove unused ref count function Rafael J. Wysocki
2012-09-19 19:56   ` Daniel Lezcano

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).