Commit 096dc32b authored by Rob Herring's avatar Rob Herring Committed by Helge Deller

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: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 7eb1220f
...@@ -549,10 +549,10 @@ static void offb_init_nodriver(struct platform_device *parent, struct device_nod ...@@ -549,10 +549,10 @@ static void offb_init_nodriver(struct platform_device *parent, struct device_nod
int foreign_endian = 0; int foreign_endian = 0;
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
if (of_get_property(dp, "little-endian", NULL)) if (of_property_read_bool(dp, "little-endian"))
foreign_endian = FBINFO_FOREIGN_ENDIAN; foreign_endian = FBINFO_FOREIGN_ENDIAN;
#else #else
if (of_get_property(dp, "big-endian", NULL)) if (of_property_read_bool(dp, "big-endian"))
foreign_endian = FBINFO_FOREIGN_ENDIAN; foreign_endian = FBINFO_FOREIGN_ENDIAN;
#endif #endif
......
...@@ -1737,10 +1737,10 @@ static int sm501fb_init_fb(struct fb_info *fb, enum sm501_controller head, ...@@ -1737,10 +1737,10 @@ static int sm501fb_init_fb(struct fb_info *fb, enum sm501_controller head,
#if defined(CONFIG_OF) #if defined(CONFIG_OF)
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
if (of_get_property(info->dev->parent->of_node, "little-endian", NULL)) if (of_property_read_bool(info->dev->parent->of_node, "little-endian"))
fb->flags |= FBINFO_FOREIGN_ENDIAN; fb->flags |= FBINFO_FOREIGN_ENDIAN;
#else #else
if (of_get_property(info->dev->parent->of_node, "big-endian", NULL)) if (of_property_read_bool(info->dev->parent->of_node, "big-endian"))
fb->flags |= FBINFO_FOREIGN_ENDIAN; fb->flags |= FBINFO_FOREIGN_ENDIAN;
#endif #endif
#endif #endif
......
...@@ -379,8 +379,7 @@ static int tcx_probe(struct platform_device *op) ...@@ -379,8 +379,7 @@ static int tcx_probe(struct platform_device *op)
spin_lock_init(&par->lock); spin_lock_init(&par->lock);
par->lowdepth = par->lowdepth = of_property_read_bool(dp, "tcx-8-bit");
(of_find_property(dp, "tcx-8-bit", NULL) != NULL);
sbusfb_fill_var(&info->var, dp, 8); sbusfb_fill_var(&info->var, dp, 8);
info->var.red.length = 8; info->var.red.length = 8;
......
...@@ -469,8 +469,7 @@ static int xilinxfb_of_probe(struct platform_device *pdev) ...@@ -469,8 +469,7 @@ static int xilinxfb_of_probe(struct platform_device *pdev)
pdata.yvirt = prop[1]; pdata.yvirt = prop[1];
} }
if (of_find_property(pdev->dev.of_node, "rotate-display", NULL)) pdata.rotate_screen = of_property_read_bool(pdev->dev.of_node, "rotate-display");
pdata.rotate_screen = 1;
platform_set_drvdata(pdev, drvdata); platform_set_drvdata(pdev, drvdata);
return xilinxfb_assign(pdev, drvdata, &pdata); return xilinxfb_assign(pdev, drvdata, &pdata);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment