Skip to content

Commit

Permalink
intel_idle: mark cpu id array as __initconst
Browse files Browse the repository at this point in the history
The CPU ids are only tested in intel_idle_probe() which is itself an
__init function. For the MODULE_DEVICE_TABLE() file2alias doesn't care
about the section, just about the symbol name. So it's safe to mark
the cpu id array as  __initconst so its memory can be released after
initialization is done.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
minipli authored and rafaeljw committed Apr 11, 2015
1 parent cdde51b commit d5cdc3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/idle/intel_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ static const struct idle_cpu idle_cpu_avn = {
#define ICPU(model, cpu) \
{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu }

static const struct x86_cpu_id intel_idle_ids[] = {
static const struct x86_cpu_id intel_idle_ids[] __initconst = {
ICPU(0x1a, idle_cpu_nehalem),
ICPU(0x1e, idle_cpu_nehalem),
ICPU(0x1f, idle_cpu_nehalem),
Expand Down

0 comments on commit d5cdc3c

Please sign in to comment.