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

fpga: xilinx-spi: Add missing spi_device_id table

The "xlnx,fpga-slave-serial" devicetree compatible string currently misses
its SPI device ID entry. Without an spi_device_id table, the driver still
works with device tree, but triggers the following runtime warning when
registered via SPI core:

SPI driver xlnx-slave-spi has no spi_device_id for xlnx,fpga-slave-serial

Fix it by adding a corresponding spi_device_id table entry.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20251026110237.986279-1-festevam@gmail.com
[ Yilun: Remove extra whitespaces ]
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>

authored by

Fabio Estevam and committed by
Xu Yilun
85faa649 74db54b2

+7
+7
drivers/fpga/xilinx-spi.c
··· 57 57 return xilinx_core_probe(core); 58 58 } 59 59 60 + static const struct spi_device_id xilinx_spi_ids[] = { 61 + { "fpga-slave-serial" }, 62 + { }, 63 + }; 64 + MODULE_DEVICE_TABLE(spi, xilinx_spi_ids); 65 + 60 66 #ifdef CONFIG_OF 61 67 static const struct of_device_id xlnx_spi_of_match[] = { 62 68 { ··· 79 73 .of_match_table = of_match_ptr(xlnx_spi_of_match), 80 74 }, 81 75 .probe = xilinx_spi_probe, 76 + .id_table = xilinx_spi_ids, 82 77 }; 83 78 84 79 module_spi_driver(xilinx_slave_spi_driver)