summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 20:26:21 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2023-03-17 04:17:30 -0700
commiteaedf192f65fc4e3e2001b8e09940386cc494bd5 (patch)
treebbf96fa35bad90f2508f5c59bc316ee731d5c923 /drivers/input
parent12c7d0aeb3beecc8b8f570d82c4d8509def71a6e (diff)
Input: zinitix - 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> Link: https://lore.kernel.org/r/20230310144708.1542682-1-robh@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/zinitix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/zinitix.c b/drivers/input/touchscreen/zinitix.c
index cdf9bcd744db..b6ece47151b8 100644
--- a/drivers/input/touchscreen/zinitix.c
+++ b/drivers/input/touchscreen/zinitix.c
@@ -260,7 +260,7 @@ static int zinitix_init_regulators(struct bt541_ts_data *bt541)
* so check if "vddo" is present and in that case use these names.
* Else use the proper supply names on the component.
*/
- if (of_find_property(dev->of_node, "vddo-supply", NULL)) {
+ if (of_property_present(dev->of_node, "vddo-supply")) {
bt541->supplies[0].supply = "vdd";
bt541->supplies[1].supply = "vddo";
} else {