intel_idle: close avn_cstates array with correct marker
authorJiang Liu <jiang.liu@linux.intel.com>
Thu, 9 Jan 2014 07:30:27 +0000 (15:30 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 10 Jan 2014 02:06:06 +0000 (03:06 +0100)
Close avn_cstates array with correct marker to avoid overflow
in function intel_idle_cpu_init().

[rjw: The problem was introduced when commit 22e580d07f65 was merged
 on top of eba682a5aeb6 (intel_idle: shrink states tables).]

Fixes: 22e580d07f65 (intel_idle: Fixed C6 state on Avoton/Rangeley processors)
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/idle/intel_idle.c

index 6f456f0f8185432371b7b0a44be44845c6fc210e..797ed29a36ea7969765e90641d15f3a66e982db3 100644 (file)
@@ -329,7 +329,7 @@ static struct cpuidle_state atom_cstates[] = {
        {
                .enter = NULL }
 };
-static struct cpuidle_state avn_cstates[] __initdata = {
+static struct cpuidle_state avn_cstates[] = {
        {
                .name = "C1-AVN",
                .desc = "MWAIT 0x00",
@@ -344,6 +344,8 @@ static struct cpuidle_state avn_cstates[] __initdata = {
                .exit_latency = 15,
                .target_residency = 45,
                .enter = &intel_idle },
+       {
+               .enter = NULL }
 };
 
 /**