Skip to content

Commit

Permalink
hwmon: tmp512: drop of_match_ptr for ID table
Browse files Browse the repository at this point in the history
The driver will match mostly by DT table (even thought there is regular
ID table) so there is little benefit in of_match_ptr (this also allows
ACPI matching via PRP0001, even though it might not be relevant here).
This also fixes !CONFIG_OF error:

  drivers/hwmon/tmp513.c:610:34: error: ‘tmp51x_of_match’ defined but not used [-Werror=unused-const-variable=]

Fixes: 59dfa75 ("hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230312193723.478032-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Krzysztof Kozlowski authored and Guenter Roeck committed Mar 12, 2023
1 parent 8d655e6 commit 00d85e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/tmp513.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ static int tmp51x_probe(struct i2c_client *client)
static struct i2c_driver tmp51x_driver = {
.driver = {
.name = "tmp51x",
.of_match_table = of_match_ptr(tmp51x_of_match),
.of_match_table = tmp51x_of_match,
},
.probe_new = tmp51x_probe,
.id_table = tmp51x_id,
Expand Down

0 comments on commit 00d85e8

Please sign in to comment.