Skip to content

Commit 1f6fa39

Browse files
robherringandersson
authored andcommitted
remoteproc: st: 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> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230310144736.1546972-1-robh@kernel.org
1 parent 82f2734 commit 1f6fa39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/remoteproc/st_remoteproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ static int st_rproc_probe(struct platform_device *pdev)
382382
clk_set_rate(ddata->clk, ddata->clk_rate);
383383
}
384384

385-
if (of_get_property(np, "mbox-names", NULL)) {
385+
if (of_property_present(np, "mbox-names")) {
386386
ddata->mbox_client_vq0.dev = dev;
387387
ddata->mbox_client_vq0.tx_done = NULL;
388388
ddata->mbox_client_vq0.tx_block = false;

0 commit comments

Comments
 (0)