summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 15:47:15 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-03-22 17:02:17 +0100
commit57150c40b6391bc350c6016641b2a487a3de3cba (patch)
treec903efd337f06e4d99d835fb126c7e5ff8fd4275 /drivers/mtd/maps
parentmtd: Avoid magic values (diff)
downloadlinux-57150c40b6391bc350c6016641b2a487a3de3cba.tar.xz
linux-57150c40b6391bc350c6016641b2a487a3de3cba.zip
mtd: 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: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230310144716.1543995-1-robh@kernel.org
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/sun_uflash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index 6c0c91bfec05..860b19f77090 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -112,7 +112,7 @@ static int uflash_probe(struct platform_device *op)
/* Flashprom must have the "user" property in order to
* be used by this driver.
*/
- if (!of_find_property(dp, "user", NULL))
+ if (!of_property_read_bool(dp, "user"))
return -ENODEV;
return uflash_devinit(op, dp);