[PATCH 06/13] cpuidle: big_little: Simplify with of_machine_device_match()
Krzysztof Kozlowski
krzysztof.kozlowski at linaro.org
Thu Nov 6 11:07:13 PST 2025
Replace open-coded getting root OF node and matching against it with
new of_machine_device_match() helper.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
---
Depends on the first OF patch.
---
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())
--
2.48.1
More information about the linux-arm-kernel
mailing list