]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: microchip: add spi_device_id tables
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Fri, 11 Mar 2022 11:17:16 +0000 (13:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2022 10:08:08 +0000 (10:08 +0000)
Add spi_device_id tables to avoid logs like "SPI driver ksz9477-switch
has no spi_device_id".

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz8795_spi.c
drivers/net/dsa/microchip/ksz9477_spi.c

index 866767b70d65bbc0097c748d81c7b8e463c0966c..b0a7dee27ffc983f7df7f2aea6fcc9e67c8ceccf 100644 (file)
@@ -124,12 +124,23 @@ static const struct of_device_id ksz8795_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, ksz8795_dt_ids);
 
+static const struct spi_device_id ksz8795_spi_ids[] = {
+       { "ksz8765" },
+       { "ksz8794" },
+       { "ksz8795" },
+       { "ksz8863" },
+       { "ksz8873" },
+       { },
+};
+MODULE_DEVICE_TABLE(spi, ksz8795_spi_ids);
+
 static struct spi_driver ksz8795_spi_driver = {
        .driver = {
                .name   = "ksz8795-switch",
                .owner  = THIS_MODULE,
                .of_match_table = of_match_ptr(ksz8795_dt_ids),
        },
+       .id_table = ksz8795_spi_ids,
        .probe  = ksz8795_spi_probe,
        .remove = ksz8795_spi_remove,
        .shutdown = ksz8795_spi_shutdown,
index e3cb0e6c9f6f2cbcb032b3b128d7aa0388552a39..43addeabfc25911c93c05ae6c667430dc55ab37a 100644 (file)
@@ -98,12 +98,24 @@ static const struct of_device_id ksz9477_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, ksz9477_dt_ids);
 
+static const struct spi_device_id ksz9477_spi_ids[] = {
+       { "ksz9477" },
+       { "ksz9897" },
+       { "ksz9893" },
+       { "ksz9563" },
+       { "ksz8563" },
+       { "ksz9567" },
+       { },
+};
+MODULE_DEVICE_TABLE(spi, ksz9477_spi_ids);
+
 static struct spi_driver ksz9477_spi_driver = {
        .driver = {
                .name   = "ksz9477-switch",
                .owner  = THIS_MODULE,
                .of_match_table = of_match_ptr(ksz9477_dt_ids),
        },
+       .id_table = ksz9477_spi_ids,
        .probe  = ksz9477_spi_probe,
        .remove = ksz9477_spi_remove,
        .shutdown = ksz9477_spi_shutdown,