Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/olpc: olpc-xo175-ec: Use SPI device ID data to bind device

The driver defines spi_device_id table for module autoloading, but does
not use it in id_table which causes W=1 warning:

drivers/platform/olpc/olpc-xo175-ec.c:737:35: error: ‘olpc_xo175_ec_id_table’ defined but not used [-Werror=unused-const-variable=]

Reference the SPI device ID table, so it can be also used for device
binding.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Link: https://lore.kernel.org/r/20230316160324.78856-1-krzysztof.kozlowski@linaro.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Krzysztof Kozlowski and committed by
Hans de Goede
d7b2b938 fd3c3584

+1
+1
drivers/platform/olpc/olpc-xo175-ec.c
··· 746 746 .of_match_table = olpc_xo175_ec_of_match, 747 747 .pm = &olpc_xo175_ec_pm_ops, 748 748 }, 749 + .id_table = olpc_xo175_ec_id_table, 749 750 .probe = olpc_xo175_ec_probe, 750 751 .remove = olpc_xo175_ec_remove, 751 752 };