diff options
author | Mathias Krause <minipli@googlemail.com> | 2015-03-25 17:15:52 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-10 20:21:15 -0400 |
commit | ea85dbcaec0ff29f2c3f84be4c8a01a94e8bd449 (patch) | |
tree | 8bd9e2c1611531f01be3a8d3564e64199a620fbb /drivers/powercap | |
parent | 34dfa36c04c5883c325e8d62905c0ca5551fcf27 (diff) |
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 <minipli@googlemail.com>
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/powercap')
-rw-r--r-- | drivers/powercap/intel_rapl.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 = { | |||
1054 | .driver_data = (kernel_ulong_t)&_ops, \ | 1054 | .driver_data = (kernel_ulong_t)&_ops, \ |
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | static const struct x86_cpu_id rapl_ids[] = { | 1057 | static const struct x86_cpu_id rapl_ids[] __initconst = { |
1058 | RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */ | 1058 | RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */ |
1059 | RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */ | 1059 | RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */ |
1060 | RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */ | 1060 | RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */ |