From e1e0a32eae7fd9566769c612f0b074eaf64b9cea Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 10 Mar 2023 08:47:00 -0600 Subject: ata: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ 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 Signed-off-by: Damien Le Moal --- drivers/ata/libahci_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/ata/libahci_platform.c') diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c index b9e336bacf17..f00da19670b0 100644 --- a/drivers/ata/libahci_platform.c +++ b/drivers/ata/libahci_platform.c @@ -363,7 +363,7 @@ static int ahci_platform_get_phy(struct ahci_host_priv *hpriv, u32 port, switch (rc) { case -ENOSYS: /* No PHY support. Check if PHY is required. */ - if (of_find_property(node, "phys", NULL)) { + if (of_property_present(node, "phys")) { dev_err(dev, "couldn't get PHY in node %pOFn: ENOSYS\n", node); -- cgit v1.2.3