diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 17:47:15 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-03-22 19:02:17 +0300 |
commit | 57150c40b6391bc350c6016641b2a487a3de3cba (patch) | |
tree | c903efd337f06e4d99d835fb126c7e5ff8fd4275 /drivers/mtd/mtdcore.c | |
parent | 75f32f4b9d5263829d1d13f990000db929140559 (diff) | |
download | linux-57150c40b6391bc350c6016641b2a487a3de3cba.tar.xz |
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/mtdcore.c')
-rw-r--r-- | drivers/mtd/mtdcore.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index c78f9f4d522c..a1a08c2b6f77 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -738,7 +738,7 @@ int add_mtd_device(struct mtd_info *mtd) mutex_unlock(&mtd_table_mutex); - if (of_find_property(mtd_get_of_node(mtd), "linux,rootfs", NULL)) { + if (of_property_read_bool(mtd_get_of_node(mtd), "linux,rootfs")) { if (IS_BUILTIN(CONFIG_MTD)) { pr_info("mtd: setting mtd%d (%s) as root device\n", mtd->index, mtd->name); ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index); |