Commit d7d744ab authored by Rob Herring's avatar Rob Herring Committed by Greg Kroah-Hartman

misc/sram: Use of_property_read_bool() for boolean properties

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230310144713.1543544-1-robh@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c2c99326
......@@ -218,14 +218,9 @@ static int sram_reserve_regions(struct sram_dev *sram, struct resource *res)
block->res = child_res;
list_add_tail(&block->list, &reserve_list);
if (of_find_property(child, "export", NULL))
block->export = true;
if (of_find_property(child, "pool", NULL))
block->pool = true;
if (of_find_property(child, "protect-exec", NULL))
block->protect_exec = true;
block->export = of_property_read_bool(child, "export");
block->pool = of_property_read_bool(child, "pool");
block->protect_exec = of_property_read_bool(child, "protect-exec");
if ((block->export || block->pool || block->protect_exec) &&
block->size) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment