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 <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino 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: Rob Herring (Arm) <robh@kernel.org>pull/1354/merge
parent
1ead1349fb
commit
4b94d21fac
|
|
@ -166,20 +166,11 @@ static const struct of_device_id compatible_machine_match[] = {
|
||||||
static int __init bl_idle_init(void)
|
static int __init bl_idle_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
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
|
* Initialize the driver just for a compliant set of machines
|
||||||
*/
|
*/
|
||||||
match_id = of_match_node(compatible_machine_match, root);
|
if (!of_machine_device_match(compatible_machine_match))
|
||||||
|
|
||||||
of_node_put(root);
|
|
||||||
|
|
||||||
if (!match_id)
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (!mcpm_is_available())
|
if (!mcpm_is_available())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue