summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tiny
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 17:47:05 +0300
committerRob Herring <robh@kernel.org>2023-03-30 21:46:07 +0300
commite27a85c1757655e2e7bd09164b87bf75627e5604 (patch)
treee7a067bc36488b2620e0f0d7d5371bdadff2920b /drivers/gpu/drm/tiny
parentb2d2d8decc8d239875420af6e412158ac5a2cb1f (diff)
downloadlinux-e27a85c1757655e2e7bd09164b87bf75627e5604.tar.xz
drm: 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 of_property_read_bool(). Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20230310144706.1542295-1-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/tiny')
-rw-r--r--drivers/gpu/drm/tiny/ofdrm.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/tiny/ofdrm.c b/drivers/gpu/drm/tiny/ofdrm.c
index 6e349ca42485..76cd7f515bab 100644
--- a/drivers/gpu/drm/tiny/ofdrm.c
+++ b/drivers/gpu/drm/tiny/ofdrm.c
@@ -162,13 +162,9 @@ static bool display_get_big_endian_of(struct drm_device *dev, struct device_node
bool big_endian;
#ifdef __BIG_ENDIAN
- big_endian = true;
- if (of_get_property(of_node, "little-endian", NULL))
- big_endian = false;
+ big_endian = !of_property_read_bool(of_node, "little-endian");
#else
- big_endian = false;
- if (of_get_property(of_node, "big-endian", NULL))
- big_endian = true;
+ big_endian = of_property_read_bool(of_node, "big-endian");
#endif
return big_endian;