diff options
| author | Rob Herring <robh@kernel.org> | 2021-10-05 17:28:21 -0500 |
|---|---|---|
| committer | Rob Herring <robh@kernel.org> | 2021-10-05 17:30:56 -0500 |
| commit | 0675c9648ac70490841259b1e449c293d27fd6ce (patch) | |
| tree | 1685fdae87650b500b07c28f5e36c94a9656e289 | |
| parent | 38fac15f5473a484d4ca87440b7e1c65655f71ac (diff) | |
| download | linux-0675c9648ac70490841259b1e449c293d27fd6ce.tar.gz | |
ARM: broadcom: Use of_get_cpu_hwid()
Replace open coded parsing of CPU nodes 'reg' property with
of_get_cpu_hwid().
Signed-off-by: Rob Herring <robh@kernel.org>
| -rw-r--r-- | arch/arm/mach-bcm/bcm63xx_pmb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-bcm/bcm63xx_pmb.c b/arch/arm/mach-bcm/bcm63xx_pmb.c index 0e5a05bac3eac..2d648462a6ab0 100644 --- a/arch/arm/mach-bcm/bcm63xx_pmb.c +++ b/arch/arm/mach-bcm/bcm63xx_pmb.c @@ -91,10 +91,10 @@ static int bcm63xx_pmb_get_resources(struct device_node *dn, struct of_phandle_args args; int ret; - ret = of_property_read_u32(dn, "reg", cpu); - if (ret) { + *cpu = of_get_cpu_hwid(dn); + if (*cpu == ~0U) { pr_err("CPU is missing a reg node\n"); - return ret; + return -ENODEV; } ret = of_parse_phandle_with_args(dn, "resets", "#reset-cells", |
