Commit 4b94d21f authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Rob Herring (Arm)
Browse files

cpuidle: big_little: Simplify with of_machine_device_match()



Replace open-coded getting root OF node and matching against it with
new of_machine_device_match() helper.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20251112-b4-of-match-matchine-data-v2-5-d46b72003fd6@linaro.org


Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
parent 1ead1349
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -166,20 +166,11 @@ static const struct of_device_id compatible_machine_match[] = {
static int __init bl_idle_init(void)
{
	int ret;
	struct device_node *root = of_find_node_by_path("/");
	const struct of_device_id *match_id;

	if (!root)
		return -ENODEV;

	/*
	 * Initialize the driver just for a compliant set of machines
	 */
	match_id = of_match_node(compatible_machine_match, root);

	of_node_put(root);

	if (!match_id)
	if (!of_machine_device_match(compatible_machine_match))
		return -ENODEV;

	if (!mcpm_is_available())