diff mbox series

wilc1000: Add id_table to spi_driver

Message ID 20211202045001.2901903-1-davidm@egauge.net
State New
Headers show
Series wilc1000: Add id_table to spi_driver | expand

Commit Message

David Mosberger-Tang Dec. 2, 2021, 4:50 a.m. UTC
This eliminates warning message:

	SPI driver WILC_SPI has no spi_device_id for microchip,wilc1000

and makes device-tree autoloading work.

Signed-off-by: David Mosberger-Tang <davidm@egauge.net>
---
 drivers/net/wireless/microchip/wilc1000/spi.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Kalle Valo Dec. 8, 2021, 6:33 p.m. UTC | #1
David Mosberger-Tang <davidm@egauge.net> wrote:

> This eliminates warning message:
> 
> 	SPI driver WILC_SPI has no spi_device_id for microchip,wilc1000
> 
> and makes device-tree autoloading work.
> 
> Signed-off-by: David Mosberger-Tang <davidm@egauge.net>

Patch applied to wireless-drivers-next.git, thanks.

f2f16ae9cc9c wilc1000: Add id_table to spi_driver
diff mbox series

Patch

diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c
index 640850f989dd..6e7fd18c14e7 100644
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -203,11 +203,18 @@  static const struct of_device_id wilc_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, wilc_of_match);
 
+static const struct spi_device_id wilc_spi_id[] = {
+	{ "wilc1000", 0 },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(spi, wilc_spi_id);
+
 static struct spi_driver wilc_spi_driver = {
 	.driver = {
 		.name = MODALIAS,
 		.of_match_table = wilc_of_match,
 	},
+	.id_table = wilc_spi_id,
 	.probe =  wilc_bus_probe,
 	.remove = wilc_bus_remove,
 };