diff options
author | Rob Herring <robh@kernel.org> | 2021-10-06 19:43:23 +0300 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2021-10-20 21:36:36 +0300 |
commit | eb11b5a9562ed450c63d2396c571c5375129cb3f (patch) | |
tree | 7787ceaa7f5ba981eb2efb013c4c9c4c976d001a /arch/arm/mach-bcm | |
parent | ca96bbe2469ffefd475c89c4d22b72f6dddb4a5c (diff) | |
download | linux-eb11b5a9562ed450c63d2396c571c5375129cb3f.tar.xz |
ARM: broadcom: Use of_get_cpu_hwid()
Replace open coded parsing of CPU nodes 'reg' property with
of_get_cpu_hwid().
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211006164332.1981454-4-robh@kernel.org
Diffstat (limited to 'arch/arm/mach-bcm')
-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 0e5a05bac3ea..003f1472ab45 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, 0); + 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", |