From 4b94d21fac33527ad79e0f2ee9bd212c058efaf2 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Wed, 12 Nov 2025 11:28:50 +0100 Subject: [PATCH] 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: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20251112-b4-of-match-matchine-data-v2-5-d46b72003fd6@linaro.org Signed-off-by: Rob Herring (Arm) --- drivers/cpuidle/cpuidle-big_little.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c index 4abba42fcc31..08f6bf2f6409 100644 --- a/drivers/cpuidle/cpuidle-big_little.c +++ b/drivers/cpuidle/cpuidle-big_little.c @@ -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())