bus: moxtet: Add spi device table
authorSjoerd Simons <sjoerd@collabora.com>
Tue, 28 Nov 2023 21:35:05 +0000 (22:35 +0100)
committerGregory CLEMENT <gregory.clement@bootlin.com>
Fri, 15 Dec 2023 14:44:11 +0000 (15:44 +0100)
The moxtet module fails to auto-load on. Add a SPI id table to
allow it to do so.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Marek BehĂșn <kabel@kernel.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
drivers/bus/moxtet.c

index 48c18f95660ab89fe57795aa6e5176ad5c2e8abb..e384fbc6c1d93152d03329724c0373d54d0059f0 100644 (file)
@@ -830,6 +830,12 @@ static void moxtet_remove(struct spi_device *spi)
        mutex_destroy(&moxtet->lock);
 }
 
+static const struct spi_device_id moxtet_spi_ids[] = {
+       { "moxtet" },
+       { },
+};
+MODULE_DEVICE_TABLE(spi, moxtet_spi_ids);
+
 static const struct of_device_id moxtet_dt_ids[] = {
        { .compatible = "cznic,moxtet" },
        {},
@@ -841,6 +847,7 @@ static struct spi_driver moxtet_spi_driver = {
                .name           = "moxtet",
                .of_match_table = moxtet_dt_ids,
        },
+       .id_table       = moxtet_spi_ids,
        .probe          = moxtet_probe,
        .remove         = moxtet_remove,
 };