summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/bw2.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 15:47:29 +0100
committerHelge Deller <deller@gmx.de>2023-03-16 16:18:17 +0100
commit29413f05fe34e8824551b91f660fde781249417d (patch)
treed962adccfeb56bb95db48231d559fbb3f83ddf21 /drivers/video/fbdev/bw2.c
parentfbdev: au1200fb: Fix potential divide by zero (diff)
downloadlinux-29413f05fe34e8824551b91f660fde781249417d.tar.xz
linux-29413f05fe34e8824551b91f660fde781249417d.zip
fbdev: 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. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video/fbdev/bw2.c')
-rw-r--r--drivers/video/fbdev/bw2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/bw2.c b/drivers/video/fbdev/bw2.c
index 6403ae07970d..9cbadcd18b25 100644
--- a/drivers/video/fbdev/bw2.c
+++ b/drivers/video/fbdev/bw2.c
@@ -306,7 +306,7 @@ static int bw2_probe(struct platform_device *op)
if (!par->regs)
goto out_release_fb;
- if (!of_find_property(dp, "width", NULL)) {
+ if (!of_property_present(dp, "width")) {
err = bw2_do_default_mode(par, info, &linebytes);
if (err)
goto out_unmap_regs;