cpuidle: Introduce cpuidle_driver_state_disabled() for driver quirks
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 18 Nov 2019 11:11:24 +0000 (12:11 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Nov 2019 09:35:13 +0000 (10:35 +0100)
commitcbda56d5fefcebc01448982a55836c88a825b34c
tree3aa65cea77748edc52069182b73dedc9f0169340
parent85f6a17f24f9f7faa4aaecf98e12acdd312aa4c9
cpuidle: Introduce cpuidle_driver_state_disabled() for driver quirks

Commit 99e98d3fb100 ("cpuidle: Consolidate disabled state checks")
overlooked the fact that the imx6q and tegra20 cpuidle drivers use
the "disabled" field in struct cpuidle_state for quirks which trigger
after the initialization of cpuidle, so reading the initial value of
that field is not sufficient for those drivers.

In order to allow them to implement the quirks without using the
"disabled" field in struct cpuidle_state, introduce a new helper
function and modify them to use it.

Fixes: 99e98d3fb100 ("cpuidle: Consolidate disabled state checks")
Reported-by: Len Brown <lenb@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/arm/mach-imx/cpuidle-imx6q.c
arch/arm/mach-tegra/cpuidle-tegra20.c
drivers/cpuidle/driver.c
include/linux/cpuidle.h