projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ebbd89
)
hwmon: (tmp421) ignore non-channel related DT nodes
author
Krzysztof Adamski
<krzysztof.adamski@nokia.com>
Thu, 14 Oct 2021 13:11:02 +0000
(15:11 +0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Fri, 15 Oct 2021 22:55:58 +0000
(15:55 -0700)
In case the DT contains some nodes not describing the input channels,
ignore them instead of exiting with error.
Signed-off-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Link:
https://lore.kernel.org/r/8e9e332b18dc2cf545f8e8255157e408d356f916.1634206677.git.krzysztof.adamski@nokia.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/tmp421.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/tmp421.c
b/drivers/hwmon/tmp421.c
index 277628e2a5103aecbd5572d19d1e918aeabe1861..31e95b5749c8b159a97145a8eb4e2a311724f695 100644
(file)
--- a/
drivers/hwmon/tmp421.c
+++ b/
drivers/hwmon/tmp421.c
@@
-414,6
+414,9
@@
static int tmp421_probe_from_dt(struct i2c_client *client, struct tmp421_data *d
int err;
for_each_child_of_node(np, child) {
+ if (strcmp(child->name, "channel"))
+ continue;
+
err = tmp421_probe_child_from_dt(client, child, data);
if (err)
return err;