]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: tmp512: drop of_match_ptr for ID table
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 12 Mar 2023 19:37:23 +0000 (20:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:52 +0000 (13:33 +0100)
commit2b8d4b9b9af7ec1d3a32a9a39aa06fa8f6e740bc
treead6e107de33a451cc952b312474a5b3d9b63e971
parentf467b3ffe87d20a490e435f36733fdeffab4a04b
hwmon: tmp512: drop of_match_ptr for ID table

[ Upstream commit cc1bdf924aa5651c04c71ded36237904e6b11790 ]

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: 399cb470979e ("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>
drivers/hwmon/tmp513.c