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

fpga: ice40-spi: Add SPI device ID table

Currently autoloading for SPI devices does not use the DT ID table, it uses
SPI modalises. Supporting OF modalises is going to be difficult if not
impractical, an attempt was made but has been reverted, so ensure that
module autoloading works for this driver by adding a SPI ID table.

Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Moritz Fischer <mdf@kernel.org>

authored by

Mark Brown and committed by
Moritz Fischer
2a2a7957 5816b3e6

+7
+7
drivers/fpga/ice40-spi.c
··· 192 192 }; 193 193 MODULE_DEVICE_TABLE(of, ice40_fpga_of_match); 194 194 195 + static const struct spi_device_id ice40_fpga_spi_ids[] = { 196 + { .name = "ice40-fpga-mgr", }, 197 + {}, 198 + }; 199 + MODULE_DEVICE_TABLE(spi, ice40_fpga_spi_ids); 200 + 195 201 static struct spi_driver ice40_fpga_driver = { 196 202 .probe = ice40_fpga_probe, 197 203 .driver = { 198 204 .name = "ice40spi", 199 205 .of_match_table = of_match_ptr(ice40_fpga_of_match), 200 206 }, 207 + .id_table = ice40_fpga_spi_ids, 201 208 }; 202 209 203 210 module_spi_driver(ice40_fpga_driver);