Commit 194db92fd20cd7733f1ee06b330af93e10dfe727

Authored by Daniel Lezcano
Committed by Rafael J. Wysocki
1 parent 055d752f85

SH: cpuidle: remove CPUIDLE_DRIVER_STATE_START usage

The CPUIDLE_DRIVER_STATE_START constant is only set when the kernel compilation
option CONFIG_ARCH_HAS_CPU_RELAX is set, but this is only relatated to x86, so
it is always zero.

Remove the reference to this constant in the code.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff

arch/sh/kernel/cpu/shmobile/cpuidle.c
... ... @@ -63,10 +63,8 @@
63 63 struct cpuidle_device *dev = &cpuidle_dev;
64 64 struct cpuidle_driver *drv = &cpuidle_driver;
65 65 struct cpuidle_state *state;
66   - int i;
  66 + int i = 0;
67 67  
68   - i = CPUIDLE_DRIVER_STATE_START;
69   -
70 68 state = &drv->states[i++];
71 69 snprintf(state->name, CPUIDLE_NAME_LEN, "C1");
72 70 strncpy(state->desc, "SuperH Sleep Mode", CPUIDLE_DESC_LEN);
... ... @@ -77,7 +75,7 @@
77 75 state->flags |= CPUIDLE_FLAG_TIME_VALID;
78 76 state->enter = cpuidle_sleep_enter;
79 77  
80   - drv->safe_state_index = i-1;
  78 + drv->safe_state_index = 0;
81 79  
82 80 if (sh_mobile_sleep_supported & SUSP_SH_SF) {
83 81 state = &drv->states[i++];