platform/olpc: olpc-xo175-ec: Use SPI device ID data to bind device
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 16 Mar 2023 16:03:24 +0000 (17:03 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 20 Mar 2023 13:43:35 +0000 (14:43 +0100)
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>
drivers/platform/olpc/olpc-xo175-ec.c

index 4823bd2819f64fdec8e3b7c8764513816a0d231e..62ccbcb15c74466c53ccb6ed7428385b8470a847 100644 (file)
@@ -746,6 +746,7 @@ static struct spi_driver olpc_xo175_ec_spi_driver = {
                .of_match_table = olpc_xo175_ec_of_match,
                .pm = &olpc_xo175_ec_pm_ops,
        },
+       .id_table       = olpc_xo175_ec_id_table,
        .probe          = olpc_xo175_ec_probe,
        .remove         = olpc_xo175_ec_remove,
 };