linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpuidle - sysfs : move declaration in the sysfs file
@ 2012-10-25 11:46 Daniel Lezcano
  2012-10-31  0:46 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Lezcano @ 2012-10-25 11:46 UTC (permalink / raw)
  To: rjw; +Cc: linaro-dev, patches, linux-pm

The structure cpuidle_state_kobj is not used anywhere except
in the sysfs.c file. The definition of this structure is not
needed in the cpuidle header file. This patch moves it to the
sysfs.c file in order to encapsulate the code a bit more.

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

diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
index ed87399..f15c1e5 100644
--- a/drivers/cpuidle/sysfs.c
+++ b/drivers/cpuidle/sysfs.c
@@ -297,6 +297,13 @@ static struct attribute *cpuidle_state_default_attrs[] = {
 	NULL
 };
 
+struct cpuidle_state_kobj {
+	struct cpuidle_state *state;
+	struct cpuidle_state_usage *state_usage;
+	struct completion kobj_unregister;
+	struct kobject kobj;
+};
+
 #define kobj_to_state_obj(k) container_of(k, struct cpuidle_state_kobj, kobj)
 #define kobj_to_state(k) (kobj_to_state_obj(k)->state)
 #define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage)
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 279b1ea..7daf0e3 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -82,13 +82,6 @@ cpuidle_set_statedata(struct cpuidle_state_usage *st_usage, void *data)
 	st_usage->driver_data = data;
 }
 
-struct cpuidle_state_kobj {
-	struct cpuidle_state *state;
-	struct cpuidle_state_usage *state_usage;
-	struct completion kobj_unregister;
-	struct kobject kobj;
-};
-
 struct cpuidle_device {
 	unsigned int		registered:1;
 	unsigned int		enabled:1;
-- 
1.7.5.4


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

* Re: [PATCH] cpuidle - sysfs : move declaration in the sysfs file
  2012-10-25 11:46 [PATCH] cpuidle - sysfs : move declaration in the sysfs file Daniel Lezcano
@ 2012-10-31  0:46 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2012-10-31  0:46 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: linaro-dev, patches, linux-pm

On Thursday, October 25, 2012 01:46:17 PM Daniel Lezcano wrote:
> The structure cpuidle_state_kobj is not used anywhere except
> in the sysfs.c file. The definition of this structure is not
> needed in the cpuidle header file. This patch moves it to the
> sysfs.c file in order to encapsulate the code a bit more.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Applied to the linux-next branch of linux-pm.git as v3.8 material.

Thanks,
Rafael


> ---
>  drivers/cpuidle/sysfs.c |    7 +++++++
>  include/linux/cpuidle.h |    7 -------
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
> index ed87399..f15c1e5 100644
> --- a/drivers/cpuidle/sysfs.c
> +++ b/drivers/cpuidle/sysfs.c
> @@ -297,6 +297,13 @@ static struct attribute *cpuidle_state_default_attrs[] = {
>  	NULL
>  };
>  
> +struct cpuidle_state_kobj {
> +	struct cpuidle_state *state;
> +	struct cpuidle_state_usage *state_usage;
> +	struct completion kobj_unregister;
> +	struct kobject kobj;
> +};
> +
>  #define kobj_to_state_obj(k) container_of(k, struct cpuidle_state_kobj, kobj)
>  #define kobj_to_state(k) (kobj_to_state_obj(k)->state)
>  #define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage)
> diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
> index 279b1ea..7daf0e3 100644
> --- a/include/linux/cpuidle.h
> +++ b/include/linux/cpuidle.h
> @@ -82,13 +82,6 @@ cpuidle_set_statedata(struct cpuidle_state_usage *st_usage, void *data)
>  	st_usage->driver_data = data;
>  }
>  
> -struct cpuidle_state_kobj {
> -	struct cpuidle_state *state;
> -	struct cpuidle_state_usage *state_usage;
> -	struct completion kobj_unregister;
> -	struct kobject kobj;
> -};
> -
>  struct cpuidle_device {
>  	unsigned int		registered:1;
>  	unsigned int		enabled:1;

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

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

end of thread, other threads:[~2012-10-31  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-25 11:46 [PATCH] cpuidle - sysfs : move declaration in the sysfs file Daniel Lezcano
2012-10-31  0:46 ` 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).