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

net: vertexcom: mse102x: Silence no spi_device_id warnings

SPI devices use the spi_device_id for module autoloading even on
systems using device tree, after commit 5fa6863ba692 ("spi: Check
we have a spi_device_id for each DT compatible"), kernel warns as
follows since the spi_device_id is missing:

SPI driver mse102x has no spi_device_id for vertexcom,mse1021
SPI driver mse102x has no spi_device_id for vertexcom,mse1022

Add spi_device_id entries to silence the warnings, and ensure driver
module autoloading works.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Link: https://lore.kernel.org/r/20220922065717.1448498-1-weiyongjun@huaweicloud.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Wei Yongjun and committed by
Jakub Kicinski
1bba1998 9f1e3378

+8
+8
drivers/net/ethernet/vertexcom/mse102x.c
··· 750 750 }; 751 751 MODULE_DEVICE_TABLE(of, mse102x_match_table); 752 752 753 + static const struct spi_device_id mse102x_ids[] = { 754 + { "mse1021" }, 755 + { "mse1022" }, 756 + { } 757 + }; 758 + MODULE_DEVICE_TABLE(spi, mse102x_ids); 759 + 753 760 static struct spi_driver mse102x_driver = { 754 761 .driver = { 755 762 .name = DRV_NAME, ··· 765 758 }, 766 759 .probe = mse102x_probe_spi, 767 760 .remove = mse102x_remove_spi, 761 + .id_table = mse102x_ids, 768 762 }; 769 763 module_spi_driver(mse102x_driver); 770 764