Commit c763a083 authored by Rob Herring's avatar Rob Herring

sbus: display7seg: 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().

Link: https://lore.kernel.org/r/20230310144723.1544930-1-robh@kernel.orgSigned-off-by: default avatarRob Herring <robh@kernel.org>
parent 928f4de0
......@@ -200,9 +200,8 @@ static int d7s_probe(struct platform_device *op)
*/
regs = readb(p->regs);
opts = of_find_node_by_path("/options");
if (opts &&
of_get_property(opts, "d7s-flipped?", NULL))
p->flipped = true;
if (opts)
p->flipped = of_property_read_bool(opts, "d7s-flipped?");
if (p->flipped)
regs |= D7S_FLIP;
......
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