[PATCH] pm: remove useless array definition in cpuidle_structure

From: Robert Lee
Date: Thu Nov 03 2011 - 17:48:52 EST


From: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Robert Lee <rob.lee@xxxxxxxxxx>
---
include/linux/cpuidle.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index b51629e..16f9dce 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -117,8 +117,8 @@ static inline int cpuidle_get_last_residency(struct cpuidle_device *dev)
****************************/

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

#ifdef CONFIG_CPU_IDLE
--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/