1
0
Fork 0

cpuidle: remove useless array definition in cpuidle_structure

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>
hifive-unleashed-5.1
Daniel Lezcano 2012-03-26 14:51:27 +02:00 committed by Len Brown
parent fc850f39ea
commit db70b04407
1 changed files with 1 additions and 1 deletions

View File

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