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

rtc: ds1390: Add SPI 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 an id_table listing the
SPI IDs for everything.

Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210923194922.53386-3-broonie@kernel.org

authored by

Mark Brown and committed by
Alexandre Belloni
da87639d 8719a176

+7
+7
drivers/rtc/rtc-ds1390.c
··· 219 219 }; 220 220 MODULE_DEVICE_TABLE(of, ds1390_of_match); 221 221 222 + static const struct spi_device_id ds1390_spi_ids[] = { 223 + { .name = "ds1390" }, 224 + {} 225 + }; 226 + MODULE_DEVICE_TABLE(spi, ds1390_spi_ids); 227 + 222 228 static struct spi_driver ds1390_driver = { 223 229 .driver = { 224 230 .name = "rtc-ds1390", 225 231 .of_match_table = of_match_ptr(ds1390_of_match), 226 232 }, 227 233 .probe = ds1390_probe, 234 + .id_table = ds1390_spi_ids, 228 235 }; 229 236 230 237 module_spi_driver(ds1390_driver);