Skip to content

Commit

Permalink
hwmon: (lm73) Add support for of_match_table
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Henry Shen authored and Guenter Roeck committed Mar 9, 2020
1 parent 8e67ff6 commit 0454e79
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/hwmon/lm73.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0454e79

Please sign in to comment.