diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 17:47:22 +0300 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2023-04-21 17:20:43 +0300 |
commit | c763a0833fd451a7bbe207be843caf1666f46612 (patch) | |
tree | 68448f5c6dc2643a8e8c2871b5aad8dcb27b1510 /drivers/sbus | |
parent | 928f4de0c03eb2eddd172395809094135fd879f7 (diff) | |
download | linux-c763a0833fd451a7bbe207be843caf1666f46612.tar.xz |
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>
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/display7seg.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index d93595b39afa..5368b6ba2884 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c @@ -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; |