projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e67ff6
)
hwmon: (lm73) Add support for of_match_table
author
Henry Shen
<henry.shen@alliedtelesis.co.nz>
Wed, 12 Feb 2020 03:06:15 +0000
(16:06 +1300)
committer
Guenter Roeck
<linux@roeck-us.net>
Mon, 9 Mar 2020 03:35:47 +0000
(20:35 -0700)
Add the of_match_table.
Signed-off-by: Henry Shen <henry.shen@alliedtelesis.co.nz>
Link:
https://lore.kernel.org/r/20200212030615.28537-3-henry.shen@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm73.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/lm73.c
b/drivers/hwmon/lm73.c
index 1eeb9d7de2a05a0586a995f743c9b83956f99b6f..733c48bf6c9862d0f507fd969900afda63d82026 100644
(file)
--- a/
drivers/hwmon/lm73.c
+++ b/
drivers/hwmon/lm73.c
@@
-262,10
+262,20
@@
static int lm73_detect(struct i2c_client *new_client,
return 0;
}
+static const struct of_device_id lm73_of_match[] = {
+ {
+ .compatible = "ti,lm73",
+ },
+ { },
+};
+
+MODULE_DEVICE_TABLE(of, lm73_of_match);
+
static struct i2c_driver lm73_driver = {
.class = I2C_CLASS_HWMON,
.driver = {
.name = "lm73",
+ .of_match_table = lm73_of_match,
},
.probe = lm73_probe,
.id_table = lm73_ids,