Skip to content

Commit 7467c9d

Browse files
sudeep-hollarobherring
authored andcommitted
of: return of_get_cpu_node from of_cpu_device_node_get if CPUs are not registered
Instead of the callsites choosing between of_cpu_device_node_get if the CPUs are registered as of_node is populated by then and of_get_cpu_node when the CPUs are not yet registered as CPU of_nodes are not yet stashed thereby needing to parse the device tree, we can call of_get_cpu_node in case the CPUs are not yet registered. This will allow to use of_cpu_device_node_get anywhere hiding the details from the caller. Cc: Rob Herring <[email protected]> Cc: Frank Rowand <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Rob Herring <[email protected]>
1 parent e906e1e commit 7467c9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/of_device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
5050
struct device *cpu_dev;
5151
cpu_dev = get_cpu_device(cpu);
5252
if (!cpu_dev)
53-
return NULL;
53+
return of_get_cpu_node(cpu, NULL);
5454
return of_node_get(cpu_dev->of_node);
5555
}
5656

0 commit comments

Comments
 (0)