diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 15:47:12 +0100 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-04-26 12:40:32 +0200 |
commit | 1ba58fbbe619125af113d0583c4b6bade94168d1 (patch) | |
tree | 41b0939c49a339ccb1cc64900495baa8243fdf50 /drivers/mfd/stmpe.c | |
parent | mfd: da903x: Remove MODULE_LICENSE in non-modules (diff) | |
download | linux-1ba58fbbe619125af113d0583c4b6bade94168d1.tar.xz linux-1ba58fbbe619125af113d0583c4b6bade94168d1.zip |
mfd: various: 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: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230310144712.1543379-1-robh@kernel.org
Diffstat (limited to '')
-rw-r--r-- | drivers/mfd/stmpe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index c304d20bb988..a92301dfc712 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c @@ -1378,7 +1378,7 @@ int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum) stmpe_of_probe(pdata, np); - if (of_find_property(np, "interrupts", NULL) == NULL) + if (!of_property_present(np, "interrupts")) ci->irq = -1; stmpe = devm_kzalloc(ci->dev, sizeof(struct stmpe), GFP_KERNEL); |