Skip to content

Commit ea85dbc

Browse files
miniplirafaeljw
authored andcommitted
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 <[email protected]> Acked-by: Jacob Pan <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 34dfa36 commit ea85dbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/powercap/intel_rapl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ static const struct rapl_defaults rapl_defaults_atom = {
10541054
.driver_data = (kernel_ulong_t)&_ops, \
10551055
}
10561056

1057-
static const struct x86_cpu_id rapl_ids[] = {
1057+
static const struct x86_cpu_id rapl_ids[] __initconst = {
10581058
RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */
10591059
RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */
10601060
RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */

0 commit comments

Comments
 (0)