OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c45c1e8
)
spi: spi-mux: Add module info needed for autoloading
author
Uwe Kleine-König
<u.kleine-koenig@pengutronix.de>
Wed, 21 Jul 2021 09:53:21 +0000
(11:53 +0200)
committer
Mark Brown
<broonie@kernel.org>
Thu, 22 Jul 2021 11:40:06 +0000
(12:40 +0100)
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 <u.kleine-koenig@pengutronix.de>
Link:
https://lore.kernel.org/r/20210721095321.2165453-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mux.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-mux.c
b/drivers/spi/spi-mux.c
index
37dfc6e
..
9708b78
100644
(file)
--- a/
drivers/spi/spi-mux.c
+++ b/
drivers/spi/spi-mux.c
@@
-167,10
+167,17
@@
err_put_ctlr:
return ret;
}
+static const struct spi_device_id spi_mux_id[] = {
+ { "spi-mux" },
+ { }
+};
+MODULE_DEVICE_TABLE(spi, spi_mux_id);
+
static const struct of_device_id spi_mux_of_match[] = {
{ .compatible = "spi-mux" },
{ }
};
+MODULE_DEVICE_TABLE(of, spi_mux_of_match);
static struct spi_driver spi_mux_driver = {
.probe = spi_mux_probe,
@@
-178,6
+185,7
@@
static struct spi_driver spi_mux_driver = {
.name = "spi-mux",
.of_match_table = spi_mux_of_match,
},
+ .id_table = spi_mux_id,
};
module_spi_driver(spi_mux_driver);