From 57150c40b6391bc350c6016641b2a487a3de3cba Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 10 Mar 2023 08:47:15 -0600 Subject: mtd: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ 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 Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230310144716.1543995-1-robh@kernel.org --- drivers/mtd/devices/spear_smi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/mtd/devices/spear_smi.c') 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++; } -- cgit