intel_idle: mark cpu id array as __initconst
authorMathias Krause <minipli@googlemail.com>
Wed, 25 Mar 2015 21:15:14 +0000 (22:15 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 11 Apr 2015 00:25:01 +0000 (02:25 +0200)
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>
drivers/idle/intel_idle.c

index b0e58522780d48c49b9a1ebff182d5fa7a43d93c..f5b7fc56fa4a85da085cde82863d69bb594216e5 100644 (file)
@@ -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),
This page took 0.02739 seconds and 5 git commands to generate.