mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-17 22:06:41 +07:00
spi: AD ASoC: declare missing of table
Add missing <of_device_id> table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS. Before this patch: modinfo sound/soc/codecs/snd-soc-adau1977-spi.ko | grep alias alias: spi:adau1979 alias: spi:adau1978 alias: spi:adau1977 After this patch: modinfo sound/soc/codecs/snd-soc-adau1977-spi.ko | grep alias alias: of:N*T*Cadi,adau1979C* alias: of:N*T*Cadi,adau1979 alias: of:N*T*Cadi,adau1978C* alias: of:N*T*Cadi,adau1978 alias: of:N*T*Cadi,adau1977C* alias: of:N*T*Cadi,adau1977 alias: spi:adau1979 alias: spi:adau1978 alias: spi:adau1977 Reported-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Daniel Gomez <dagmcr@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ba3ce8cb38
commit
2a168e10d6
@ -10,6 +10,8 @@
|
|||||||
#include <linux/mod_devicetable.h>
|
#include <linux/mod_devicetable.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
#include <linux/of_device.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <sound/soc.h>
|
#include <sound/soc.h>
|
||||||
|
|
||||||
@ -54,9 +56,18 @@ static const struct spi_device_id adau1977_spi_ids[] = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(spi, adau1977_spi_ids);
|
MODULE_DEVICE_TABLE(spi, adau1977_spi_ids);
|
||||||
|
|
||||||
|
static const struct of_device_id adau1977_spi_of_match[] = {
|
||||||
|
{ .compatible = "adi,adau1977" },
|
||||||
|
{ .compatible = "adi,adau1978" },
|
||||||
|
{ .compatible = "adi,adau1979" },
|
||||||
|
{ },
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, adau1977_spi_of_match);
|
||||||
|
|
||||||
static struct spi_driver adau1977_spi_driver = {
|
static struct spi_driver adau1977_spi_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "adau1977",
|
.name = "adau1977",
|
||||||
|
.of_match_table = of_match_ptr(adau1977_spi_of_match),
|
||||||
},
|
},
|
||||||
.probe = adau1977_spi_probe,
|
.probe = adau1977_spi_probe,
|
||||||
.id_table = adau1977_spi_ids,
|
.id_table = adau1977_spi_ids,
|
||||||
|
Loading…
Reference in New Issue
Block a user