Skip to content

Commit

Permalink
mips: Use of_property_read_bool() for boolean properties
Browse files Browse the repository at this point in the history
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: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  • Loading branch information
Rob Herring authored and Thomas Bogendoerfer committed Mar 14, 2023
1 parent 8355289 commit 9c99b48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/mips/pci/pci-lantiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static int ltq_pci_startup(struct platform_device *pdev)

/* and enable the clocks */
clk_enable(clk_pci);
if (of_find_property(node, "lantiq,external-clock", NULL))
if (of_property_read_bool(node, "lantiq,external-clock"))
clk_enable(clk_external);
else
clk_disable(clk_external);
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/pci/pci-rt3883.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ static int rt3883_pci_probe(struct platform_device *pdev)

/* find the interrupt controller child node */
for_each_child_of_node(np, child) {
if (of_get_property(child, "interrupt-controller", NULL)) {
if (of_property_read_bool(child, "interrupt-controller")) {
rpc->intc_of_node = child;
break;
}
Expand Down

0 comments on commit 9c99b48

Please sign in to comment.