Skip to content

Commit fc331de

Browse files
krzkgregkh
authored andcommitted
hwmon: tmp512: drop of_match_ptr for ID table
[ Upstream commit 00d85e8 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 634b330 commit fc331de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/tmp513.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ static int tmp51x_probe(struct i2c_client *client)
758758
static struct i2c_driver tmp51x_driver = {
759759
.driver = {
760760
.name = "tmp51x",
761-
.of_match_table = of_match_ptr(tmp51x_of_match),
761+
.of_match_table = tmp51x_of_match,
762762
},
763763
.probe_new = tmp51x_probe,
764764
.id_table = tmp51x_id,

0 commit comments

Comments
 (0)