linux-stable/drivers/cpuidle
Ulf Hansson c08a8c556c 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>
2022-12-31 13:25:42 +01:00
..
governors
Kconfig
Kconfig.arm
Kconfig.mips
Kconfig.powerpc
Kconfig.riscv
Makefile
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-kirkwood.c
cpuidle-mvebu-v7.c
cpuidle-powernv.c
cpuidle-psci-domain.c
cpuidle-psci.c
cpuidle-psci.h
cpuidle-pseries.c
cpuidle-qcom-spm.c
cpuidle-riscv-sbi.c cpuidle: riscv-sbi: Fix CPU_PM_CPU_IDLE_ENTER_xyz() macro usage 2022-10-21 12:38:56 +02:00
cpuidle-tegra.c
cpuidle-ux500.c
cpuidle-zynq.c
cpuidle.c More power management updates for 5.20-rc1 2022-08-08 14:29:00 -07:00
cpuidle.h
driver.c
dt_idle_genpd.c
dt_idle_genpd.h
dt_idle_states.c cpuidle: dt: Return the correct numbers of parsed idle states 2022-12-31 13:25:42 +01:00
dt_idle_states.h
governor.c
poll_state.c
sysfs.c