Skip to content

Commit 69a6d06

Browse files
brooniemiquelraynal
authored andcommitted
mtd: mchp48l640: 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: 96c8395 ("spi: Revert modalias changes") Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Michael Walle <michael@walle.cc> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220202143404.16070-4-broonie@kernel.org
1 parent bc7ee2e commit 69a6d06

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/mtd/devices/mchp48l640.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,23 @@ static const struct of_device_id mchp48l640_of_table[] = {
359359
};
360360
MODULE_DEVICE_TABLE(of, mchp48l640_of_table);
361361

362+
static const struct spi_device_id mchp48l640_spi_ids[] = {
363+
{
364+
.name = "48l640",
365+
.driver_data = (kernel_ulong_t)&mchp48l640_caps,
366+
},
367+
{}
368+
};
369+
MODULE_DEVICE_TABLE(spi, mchp48l640_spi_ids);
370+
362371
static struct spi_driver mchp48l640_driver = {
363372
.driver = {
364373
.name = "mchp48l640",
365374
.of_match_table = mchp48l640_of_table,
366375
},
367376
.probe = mchp48l640_probe,
368377
.remove = mchp48l640_remove,
378+
.id_table = mchp48l640_spi_ids,
369379
};
370380

371381
module_spi_driver(mchp48l640_driver);

0 commit comments

Comments
 (0)