diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 08:47:30 -0600 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-03-14 18:49:39 +0100 |
commit | 096dc32bb73d20e0854b3a471379f577f903f0ee (patch) | |
tree | ceb054ca9c5ccbc52a50d4f50cdc28ac9ff7ce95 /drivers/video/fbdev/offb.c | |
parent | 7eb1220f4bde36a15b26e8f54480406c72081bfa (diff) | |
download | lwn-096dc32bb73d20e0854b3a471379f577f903f0ee.tar.gz lwn-096dc32bb73d20e0854b3a471379f577f903f0ee.zip |
fbdev: 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: Rob Herring <robh@kernel.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video/fbdev/offb.c')
-rw-r--r-- | drivers/video/fbdev/offb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c index f7ad6bc9d02d..b97d251d894b 100644 --- a/drivers/video/fbdev/offb.c +++ b/drivers/video/fbdev/offb.c @@ -549,10 +549,10 @@ static void offb_init_nodriver(struct platform_device *parent, struct device_nod int foreign_endian = 0; #ifdef __BIG_ENDIAN - if (of_get_property(dp, "little-endian", NULL)) + if (of_property_read_bool(dp, "little-endian")) foreign_endian = FBINFO_FOREIGN_ENDIAN; #else - if (of_get_property(dp, "big-endian", NULL)) + if (of_property_read_bool(dp, "big-endian")) foreign_endian = FBINFO_FOREIGN_ENDIAN; #endif |