Skip to content

Commit c763a08

Browse files
committed
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.org Signed-off-by: Rob Herring <robh@kernel.org>
1 parent 928f4de commit c763a08

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/sbus/char/display7seg.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,8 @@ static int d7s_probe(struct platform_device *op)
200200
*/
201201
regs = readb(p->regs);
202202
opts = of_find_node_by_path("/options");
203-
if (opts &&
204-
of_get_property(opts, "d7s-flipped?", NULL))
205-
p->flipped = true;
203+
if (opts)
204+
p->flipped = of_property_read_bool(opts, "d7s-flipped?");
206205

207206
if (p->flipped)
208207
regs |= D7S_FLIP;

0 commit comments

Comments
 (0)