linux-stable/drivers/cpuidle
Ulf Hansson eea8631ca7 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-07 12:07:13 +01:00
..
governors
Kconfig
Kconfig.arm
Kconfig.mips
Kconfig.powerpc
Makefile
coupled.c
cpuidle-arm.c
cpuidle-at91.c
cpuidle-big_little.c cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:44:55 +01:00
cpuidle-calxeda.c
cpuidle-clps711x.c
cpuidle-cps.c
cpuidle-exynos.c
cpuidle-kirkwood.c
cpuidle-mvebu-v7.c
cpuidle-powernv.c cpuidle: powernv: Fix promotion from snooze if next state disabled 2018-07-03 11:23:08 +02:00
cpuidle-pseries.c powerpc/pseries/cpuidle: Fix preempt warning 2019-01-26 09:38:33 +01:00
cpuidle-ux500.c
cpuidle-zynq.c
cpuidle.c cpuidle: fix broadcast control when broadcast can not be entered 2017-12-25 14:23:46 +01:00
cpuidle.h
driver.c cpuidle: Do not unset the driver if it is there already 2019-12-21 10:42:04 +01:00
dt_idle_states.c cpuidle: dt: Return the correct numbers of parsed idle states 2023-01-07 12:07:13 +01:00
dt_idle_states.h
governor.c
sysfs.c cpuidle: Fix kobject memory leaks in error paths 2021-11-26 11:48:33 +01:00