summaryrefslogtreecommitdiff
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 08:47:15 -0600
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-03-22 17:02:17 +0100
commit57150c40b6391bc350c6016641b2a487a3de3cba (patch)
treec903efd337f06e4d99d835fb126c7e5ff8fd4275 /drivers/mtd/devices
parent75f32f4b9d5263829d1d13f990000db929140559 (diff)
downloadlwn-57150c40b6391bc350c6016641b2a487a3de3cba.tar.gz
lwn-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/devices')
-rw-r--r--drivers/mtd/devices/spear_smi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index f58742486d3d..cc17133be297 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -820,8 +820,8 @@ static int spear_smi_probe_config_dt(struct platform_device *pdev,
pdata->board_flash_info->mem_base = be32_to_cpup(&addr[0]);
pdata->board_flash_info->size = be32_to_cpup(&addr[1]);
- if (of_get_property(pp, "st,smi-fast-mode", NULL))
- pdata->board_flash_info->fast_mode = 1;
+ pdata->board_flash_info->fast_mode =
+ of_property_read_bool(pp, "st,smi-fast-mode");
i++;
}