diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 08:47:05 -0600 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2023-03-28 14:55:33 -0500 |
commit | 7fa5047a436ba27696e344d974811d9ea07ba249 (patch) | |
tree | 2d9706db2b45654aa6fc072009744c0eb3467d81 /drivers/gpu/drm/sun4i/sun4i_backend.c | |
parent | 981f8866754dc5aec6864b877acb248dc33a7bc8 (diff) | |
download | linux-7fa5047a436ba27696e344d974811d9ea07ba249.tar.gz linux-7fa5047a436ba27696e344d974811d9ea07ba249.tar.bz2 linux-7fa5047a436ba27696e344d974811d9ea07ba249.zip |
drm: Use of_property_present() for testing DT property presence
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. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com> # i.MX bridge
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20230310144705.1542207-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_backend.c')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_backend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c index 38070fc261f3..b11dbd50d73e 100644 --- a/drivers/gpu/drm/sun4i/sun4i_backend.c +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c @@ -792,7 +792,7 @@ static int sun4i_backend_bind(struct device *dev, struct device *master, dev_set_drvdata(dev, backend); spin_lock_init(&backend->frontend_lock); - if (of_find_property(dev->of_node, "interconnects", NULL)) { + if (of_property_present(dev->of_node, "interconnects")) { /* * This assume we have the same DMA constraints for all our the * devices in our pipeline (all the backends, but also the |