diff mbox

[4/4] cpuidle - sysfs : move declaration in the sysfs file

Message ID 1349907691-6002-5-git-send-email-daniel.lezcano@linaro.org
State Superseded
Headers show

Commit Message

Daniel Lezcano Oct. 10, 2012, 10:21 p.m. UTC
The structure cpuidle_state_kobj is not used anywhere except
in the sysfs.c file. The definition of this function is not
needed in the cpuidle header file.

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

Comments

Rafael J. Wysocki Oct. 17, 2012, 5:49 a.m. UTC | #1
On Thursday 11 of October 2012 00:21:31 Daniel Lezcano wrote:
> The structure cpuidle_state_kobj is not used anywhere except
> in the sysfs.c file. The definition of this function is not
                                                ^^^^

Surely structure?

> needed in the cpuidle header file.
> 
> 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 c25e26e..c756ba4 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;
>
Daniel Lezcano Oct. 17, 2012, 9:07 a.m. UTC | #2
On 10/17/2012 07:49 AM, Rafael J. Wysocki wrote:
> On Thursday 11 of October 2012 00:21:31 Daniel Lezcano wrote:
>> The structure cpuidle_state_kobj is not used anywhere except
>> in the sysfs.c file. The definition of this function is not
>                                                 ^^^^
> 
> Surely structure?

Yep :)

>> needed in the cpuidle header file.
>>
>> 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 c25e26e..c756ba4 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;
>>
diff mbox

Patch

diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
index c25e26e..c756ba4 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;