From: Daniel Lezcano Date: Mon, 26 Mar 2012 12:51:27 +0000 (+0200) Subject: cpuidle: remove useless array definition in cpuidle_structure X-Git-Tag: Ubuntu-5.2.0-15.16~18310^2~5 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=db70b04407a63668e5fee773f76f90367492fd25;p=mirror_ubuntu-eoan-kernel.git 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 Acked-by: Deepthi Dharwar Tested-by: Deepthi Dharwar Signed-off-by: Len Brown --- diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index ca4e4983773f..f7f1d9040da3 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -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;