diff options
author | Rob Herring <robh@kernel.org> | 2023-02-08 17:13:23 -0600 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2023-02-17 15:46:20 -0600 |
commit | 16b0c7cad99e96b002e26f016f28150cc7c52514 (patch) | |
tree | 0b3c3b90787ed4338d46b039170be1939b505107 /drivers/of/platform.c | |
parent | 2f0cb4753dd2b5fe71d04407213e2ef253dcdd32 (diff) | |
download | linux-16b0c7cad99e96b002e26f016f28150cc7c52514.tar.gz linux-16b0c7cad99e96b002e26f016f28150cc7c52514.tar.bz2 linux-16b0c7cad99e96b002e26f016f28150cc7c52514.zip |
of: Use preferred of_property_read_* functions
Replace instances of of_get_property/of_find_property() with appropriate
typed of_property_read_*() functions.
Link: https://lore.kernel.org/all/20230215215502.690716-1-robh@kernel.org/
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r-- | drivers/of/platform.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index f7d796b54039..9f015ad73288 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -222,7 +222,6 @@ static struct amba_device *of_amba_device_create(struct device_node *node, struct device *parent) { struct amba_device *dev; - const void *prop; int ret; pr_debug("Creating amba device %pOF\n", node); @@ -250,9 +249,7 @@ static struct amba_device *of_amba_device_create(struct device_node *node, of_device_make_bus_id(&dev->dev); /* Allow the HW Peripheral ID to be overridden */ - prop = of_get_property(node, "arm,primecell-periphid", NULL); - if (prop) - dev->periphid = of_read_ulong(prop, 1); + of_property_read_u32(node, "arm,primecell-periphid", &dev->periphid); ret = of_address_to_resource(node, 0, &dev->res); if (ret) { |