diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 15:47:00 +0100 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2023-03-23 02:29:26 +0100 |
commit | e1e0a32eae7fd9566769c612f0b074eaf64b9cea (patch) | |
tree | 75eb2e68916e22c7510e7a3c9f4ca5ba66fceffb /drivers/ata/ahci_mtk.c | |
parent | ahci: qoriq: Add platform dependencies (diff) | |
download | linux-e1e0a32eae7fd9566769c612f0b074eaf64b9cea.tar.xz linux-e1e0a32eae7fd9566769c612f0b074eaf64b9cea.zip |
ata: 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>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata/ahci_mtk.c')
-rw-r--r-- | drivers/ata/ahci_mtk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci_mtk.c b/drivers/ata/ahci_mtk.c index c056378e3e72..5714efe3f8e7 100644 --- a/drivers/ata/ahci_mtk.c +++ b/drivers/ata/ahci_mtk.c @@ -106,7 +106,7 @@ static int mtk_ahci_parse_property(struct ahci_host_priv *hpriv, struct device_node *np = dev->of_node; /* enable SATA function if needed */ - if (of_find_property(np, "mediatek,phy-mode", NULL)) { + if (of_property_present(np, "mediatek,phy-mode")) { plat->mode = syscon_regmap_lookup_by_phandle( np, "mediatek,phy-mode"); if (IS_ERR(plat->mode)) { |