diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2017-07-24 15:55:13 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2017-08-21 19:19:57 +0200 |
commit | 7467c9d9598993d8531b2f76c090a5743000612b (patch) | |
tree | f7c953f576ad60b4554c29826a58f73f2ea62ac9 | |
parent | iio: srf08: add device tree binding for srf02 and srf10 (diff) | |
download | linux-7467c9d9598993d8531b2f76c090a5743000612b.tar.xz linux-7467c9d9598993d8531b2f76c090a5743000612b.zip |
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 <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r-- | include/linux/of_device.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index b4ad8b4f8506..611502524425 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -50,7 +50,7 @@ static inline struct device_node *of_cpu_device_node_get(int cpu) struct device *cpu_dev; cpu_dev = get_cpu_device(cpu); if (!cpu_dev) - return NULL; + return of_get_cpu_node(cpu, NULL); return of_node_get(cpu_dev->of_node); } |