Skip to content

Commit

Permalink
mmc: arasan: Use of_property_present() for testing DT property presence
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. 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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
robherring authored and storulf committed Mar 23, 2023
1 parent 4950240 commit 66756ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/sdhci-of-arasan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ static void sdhci_arasan_unregister_sdclk(struct device *dev)
{
struct device_node *np = dev->of_node;

if (!of_find_property(np, "#clock-cells", NULL))
if (!of_property_present(np, "#clock-cells"))
return;

of_clk_del_provider(dev->of_node);
Expand Down

0 comments on commit 66756ca

Please sign in to comment.