From: Mathias Krause Date: Wed, 25 Mar 2015 21:15:52 +0000 (+0100) Subject: powercap / RAPL: mark rapl_ids array as __initconst X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ea85dbcaec0ff29f2c3f84be4c8a01a94e8bd449;p=linux-beck.git powercap / RAPL: mark rapl_ids array as __initconst The RAPL ids are only tested in rapl_init() which is itself an __init function. For the MODULE_DEVICE_TABLE() file2alias doesn't care about the section, just about the symbol name. Therefore it's safe to mark the rapl_ids[] array as __initconst so its memory can be released after initialization is done. Signed-off-by: Mathias Krause Acked-by: Jacob Pan Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c index 678ac8c178b2..e03877c4b195 100644 --- a/drivers/powercap/intel_rapl.c +++ b/drivers/powercap/intel_rapl.c @@ -1054,7 +1054,7 @@ static const struct rapl_defaults rapl_defaults_atom = { .driver_data = (kernel_ulong_t)&_ops, \ } -static const struct x86_cpu_id rapl_ids[] = { +static const struct x86_cpu_id rapl_ids[] __initconst = { RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */ RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */ RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */