[alsa-devel] [PATCH] spi: Madera codecs: add missing of table registration
Daniel Gomez
dagmcr at gmail.com
Mon Apr 22 21:13:50 CEST 2019
MODULE_DEVICE_TABLE(of, <of_match_table> should be called to complete DT
OF mathing mechanism and register it.
Before this patch:
modinfo drivers/mfd/madera-spi.ko | grep alias
alias: spi:wm1840
alias: spi:cs47l91
alias: spi:cs47l90
alias: spi:cs47l85
alias: spi:cs47l35
After this patch:
modinfo drivers/mfd/madera-spi.ko | grep alias
alias: spi:wm1840
alias: spi:cs47l91
alias: spi:cs47l90
alias: spi:cs47l85
alias: spi:cs47l35
alias: of:N*T*Ccirrus,wm1840C*
alias: of:N*T*Ccirrus,wm1840
alias: of:N*T*Ccirrus,cs47l91C*
alias: of:N*T*Ccirrus,cs47l91
alias: of:N*T*Ccirrus,cs47l90C*
alias: of:N*T*Ccirrus,cs47l90
alias: of:N*T*Ccirrus,cs47l85C*
alias: of:N*T*Ccirrus,cs47l85
alias: of:N*T*Ccirrus,cs47l35C*
alias: of:N*T*Ccirrus,cs47l35
Reported-by: Javier Martinez Canillas <javier at dowhile0.org>
Signed-off-by: Daniel Gomez <dagmcr at gmail.com>
---
drivers/mfd/madera-spi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mfd/madera-spi.c b/drivers/mfd/madera-spi.c
index 4c398b2..1128584 100644
--- a/drivers/mfd/madera-spi.c
+++ b/drivers/mfd/madera-spi.c
@@ -121,6 +121,16 @@ static const struct spi_device_id madera_spi_ids[] = {
};
MODULE_DEVICE_TABLE(spi, madera_spi_ids);
+const struct of_device_id madera_of_match[] = {
+ { .compatible = "cirrus,cs47l35", .data = (void *)CS47L35 },
+ { .compatible = "cirrus,cs47l85", .data = (void *)CS47L85 },
+ { .compatible = "cirrus,cs47l90", .data = (void *)CS47L90 },
+ { .compatible = "cirrus,cs47l91", .data = (void *)CS47L91 },
+ { .compatible = "cirrus,wm1840", .data = (void *)WM1840 },
+ {}
+};
+MODULE_DEVICE_TABLE(of, madera_of_match);
+
static struct spi_driver madera_spi_driver = {
.driver = {
.name = "madera",
--
2.7.4
More information about the Alsa-devel
mailing list