mtd: hyperbus: Use of_property_present() for non-boolean properties
Subsystems (2)
PATCH 1/1 mtd: hyperbus: Use of_property_present() for non-boolean properties
The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence.
Signed-off-by Rob Herring (Arm) <[email protected]>
--- drivers/mtd/hyperbus/hbmc-am654.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/hyperbus/hbmc-am654.c +1 -1
@@ -176,7 +176,7 @@ static int am654_hbmc_probe(struct platform_device *pdev)if (ret)return ret; -if (of_property_read_bool (dev->of_node,"mux-controls" )) { +if (of_property_present (dev->of_node,"mux-controls" )) {struct mux_control *control =devm_mux_control_get (dev,NULL );if (IS_ERR (control))
Signature · 1 line
2.45.2
Quoted 5 lines · Rob Herring (Arm)
The use of
of_property_read_bool()for non-boolean properties is deprecated in favor ofof_property_present()when testing for property presence.Signed-off-by Rob Herring (Arm) <[email protected]>
Reviewed-by Tudor Ambarus <[email protected]>
Quoted 17 lines
--- drivers/mtd/hyperbus/hbmc-am654.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mtd/hyperbus/hbmc-am654.c +1
-1@@ -176,7 +176,7 @@ static int am654_hbmc_probe(struct platform_device *pdev)if (ret)return ret; -if (of_property_read_bool (dev->of_node,"mux-controls" )) { +if (of_property_present (dev->of_node,"mux-controls" )) {struct mux_control *control =devm_mux_control_get (dev,NULL );if (IS_ERR (control))
Miquel Raynal
maintainerHi Rob,
Quoted 3 lines · Rob Herring (Arm)
The use of
of_property_read_bool()for non-boolean properties is deprecated in favor ofof_property_present()when testing for property presence.
This patch did not apply because of another unrelated change in my tree touching the return paths in this driver, I fixed it while applying.
Thanks,
Miquèl