linux-stable/drivers/cpuidle
Ulf Hansson 1399ce344e cpuidle: dt: Return the correct numbers of parsed idle states
[ Upstream commit ee3c2c8ad6 ]

While we correctly skips to initialize an idle state from a disabled idle
state node in DT, the returned value from dt_init_idle_driver() don't get
adjusted accordingly. Instead the number of found idle state nodes are
returned, while the callers are expecting the number of successfully
initialized idle states from DT.

This leads to cpuidle drivers unnecessarily continues to initialize their
idle state specific data. Moreover, in the case when all idle states have
been disabled in DT, we would end up registering a cpuidle driver, rather
than relying on the default arch specific idle call.

Fixes: 9f14da3455 ("drivers: cpuidle: implement DT based idle states infrastructure")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:40:53 +01:00
..
governors cpuidle: teo: Avoid using "early hits" incorrectly 2020-02-05 21:22:52 +00:00
Kconfig
Kconfig.arm ARM: psci: cpuidle: Enable PSCI CPUidle driver 2019-08-09 17:51:39 +01:00
Kconfig.mips
Kconfig.powerpc
Makefile Power management updates for 5.4-rc1 2019-09-17 19:15:14 -07:00
coupled.c
cpuidle-arm.c
cpuidle-at91.c
cpuidle-big_little.c
cpuidle-calxeda.c
cpuidle-clps711x.c
cpuidle-cps.c
cpuidle-exynos.c
cpuidle-haltpoll.c cpuidle: haltpoll: Take 'idle=' override into account 2019-10-22 11:43:17 +02:00
cpuidle-kirkwood.c
cpuidle-mvebu-v7.c
cpuidle-powernv.c
cpuidle-psci.c PSCI: cpuidle: Refactor CPU suspend power_state parameter handling 2019-08-09 17:51:39 +01:00
cpuidle-pseries.c
cpuidle-ux500.c
cpuidle-zynq.c
cpuidle.c cpuidle: Fixup IRQ state 2020-09-09 19:12:21 +02:00
cpuidle.h cpuidle: allow governor switch on cpuidle_register_driver() 2019-09-11 17:36:30 +02:00
driver.c cpuidle: Do not unset the driver if it is there already 2019-12-17 19:56:20 +01:00
dt_idle_states.c cpuidle: dt: Return the correct numbers of parsed idle states 2023-01-18 11:40:53 +01:00
dt_idle_states.h
governor.c cpuidle: allow governor switch on cpuidle_register_driver() 2019-09-11 17:36:30 +02:00
poll_state.c
sysfs.c cpuidle: Fix kobject memory leaks in error paths 2021-11-17 09:48:36 +01:00