aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-01-06 07:20:31 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-02-01 08:16:36 -0500
commit9e0c7ef3f6c95357ce359a4f9223f0dfcd21cef7 (patch)
tree712c9ab76536d68dfe36299ec71e5f18829075c8 /drivers/mtd
parent64a028a6de08545a2c94f302bc7694bf48aee5b5 (diff)
UBI: mark few variables as __initdata
The @mtd_devs and @mtd_dev_param variables are used only during the initialization, and all functions that use the variables have the __init prefix. This means we can safely mark the variables as __initdata, which is a tiny optimization. Impact: tiny RAM consumption optimization when UBI is used as a kernel module. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/build.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 14cec04c34f9..eb8f19f87c68 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -59,10 +59,10 @@ struct mtd_dev_param {
59}; 59};
60 60
61/* Numbers of elements set in the @mtd_dev_param array */ 61/* Numbers of elements set in the @mtd_dev_param array */
62static int mtd_devs; 62static int __initdata mtd_devs;
63 63
64/* MTD devices specification parameters */ 64/* MTD devices specification parameters */
65static struct mtd_dev_param mtd_dev_param[UBI_MAX_DEVICES]; 65static struct mtd_dev_param __initdata mtd_dev_param[UBI_MAX_DEVICES];
66 66
67/* Root UBI "class" object (corresponds to '/<sysfs>/class/ubi/') */ 67/* Root UBI "class" object (corresponds to '/<sysfs>/class/ubi/') */
68struct class *ubi_class; 68struct class *ubi_class;