Skip to content

Commit

Permalink
cpuidle: remove useless array definition in cpuidle_structure
Browse files Browse the repository at this point in the history
All the modules name are ro-data, it is never copied to the array.

eg.

static struct cpuidle_driver intel_idle_driver = {
        .name = "intel_idle",
        .owner = THIS_MODULE,
};

It safe to assign the pointer of this ro-data to a const char *.
By this way we save 12 bytes.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Tested-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Daniel Lezcano authored and Len Brown committed Mar 30, 2012
1 parent fc850f3 commit db70b04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/cpuidle.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static inline int cpuidle_get_last_residency(struct cpuidle_device *dev)
****************************/

struct cpuidle_driver {
char name[CPUIDLE_NAME_LEN];
const char *name;
struct module *owner;

unsigned int power_specified:1;
Expand Down

0 comments on commit db70b04

Please sign in to comment.