Skip to content

Commit 7c09abb

Browse files
robherringmiquelraynal
authored andcommitted
mtd: nand: qcom: Use of_property_present() for testing DT property presence
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. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230310144715.1543926-1-robh@kernel.org
1 parent e8c047b commit 7c09abb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mtd/nand/raw/qcom_nandc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3054,7 +3054,7 @@ static int qcom_nand_host_parse_boot_partitions(struct qcom_nand_controller *nan
30543054
struct device *dev = nandc->dev;
30553055
int partitions_count, i, j, ret;
30563056

3057-
if (!of_find_property(dn, "qcom,boot-partitions", NULL))
3057+
if (!of_property_present(dn, "qcom,boot-partitions"))
30583058
return 0;
30593059

30603060
partitions_count = of_property_count_u32_elems(dn, "qcom,boot-partitions");

0 commit comments

Comments
 (0)