Skip to content

Commit 1d5ccab

Browse files
Uwe Kleine-Königbroonie
authored andcommitted
spi: spi-mux: Add module info needed for autoloading
With the spi device table udev can autoload the spi-mux module in the presence of an spi-mux device. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent c45c1e8 commit 1d5ccab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/spi/spi-mux.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,25 @@ static int spi_mux_probe(struct spi_device *spi)
167167
return ret;
168168
}
169169

170+
static const struct spi_device_id spi_mux_id[] = {
171+
{ "spi-mux" },
172+
{ }
173+
};
174+
MODULE_DEVICE_TABLE(spi, spi_mux_id);
175+
170176
static const struct of_device_id spi_mux_of_match[] = {
171177
{ .compatible = "spi-mux" },
172178
{ }
173179
};
180+
MODULE_DEVICE_TABLE(of, spi_mux_of_match);
174181

175182
static struct spi_driver spi_mux_driver = {
176183
.probe = spi_mux_probe,
177184
.driver = {
178185
.name = "spi-mux",
179186
.of_match_table = spi_mux_of_match,
180187
},
188+
.id_table = spi_mux_id,
181189
};
182190

183191
module_spi_driver(spi_mux_driver);

0 commit comments

Comments
 (0)