@@ -1086,7 +1086,6 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
#endif
cpuidle_set_statedata(state, cx);
- snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i);
strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
state->exit_latency = cx->latency;
state->target_residency = cx->latency * latency_factor;
@@ -1099,6 +1098,8 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
if (cx->entry_method == ACPI_CSTATE_FFH)
state->flags |= CPUIDLE_FLAG_TIME_VALID;
+ snprintf(state->name, CPUIDLE_NAME_LEN, "ACPI C%d",
+ ACPI_STATE_C1);
state->enter = acpi_idle_enter_c1;
dev->safe_state = state;
break;
@@ -1106,6 +1107,8 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
case ACPI_STATE_C2:
state->flags |= CPUIDLE_FLAG_BALANCED;
state->flags |= CPUIDLE_FLAG_TIME_VALID;
+ snprintf(state->name, CPUIDLE_NAME_LEN, "ACPI C%d",
+ ACPI_STATE_C2);
state->enter = acpi_idle_enter_simple;
dev->safe_state = state;
break;
@@ -1114,6 +1117,8 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
state->flags |= CPUIDLE_FLAG_DEEP;
state->flags |= CPUIDLE_FLAG_TIME_VALID;
state->flags |= CPUIDLE_FLAG_CHECK_BM;
+ snprintf(state->name, CPUIDLE_NAME_LEN, "ACPI C%d",
+ ACPI_STATE_C3);
state->enter = pr->flags.bm_check ?
acpi_idle_enter_bm :
acpi_idle_enter_simple;