Commit 1bba1998 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jakub Kicinski

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 5fa6863b ("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: default avatarWei Yongjun <weiyongjun1@huawei.com>

Link: https://lore.kernel.org/r/20220922065717.1448498-1-weiyongjun@huaweicloud.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9f1e3378
......@@ -750,6 +750,13 @@ static const struct of_device_id mse102x_match_table[] = {
};
MODULE_DEVICE_TABLE(of, mse102x_match_table);
static const struct spi_device_id mse102x_ids[] = {
{ "mse1021" },
{ "mse1022" },
{ }
};
MODULE_DEVICE_TABLE(spi, mse102x_ids);
static struct spi_driver mse102x_driver = {
.driver = {
.name = DRV_NAME,
......@@ -758,6 +765,7 @@ static struct spi_driver mse102x_driver = {
},
.probe = mse102x_probe_spi,
.remove = mse102x_remove_spi,
.id_table = mse102x_ids,
};
module_spi_driver(mse102x_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment