mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
ASoC: rockchip-spi-codec: Silence no spi_device_id warning
SPI devices use the spi_device_id for module autoloading even on
systems using device tree, after commit 5fa6863ba6 ("spi: Check
we have a spi_device_id for each DT compatible"), kernel warns as
follows since the spi_device_id is missing:
SPI driver spi_codec has no spi_device_id for rockchip,spi-codec
Add spi_device_id entries to silence the warning, and ensure driver
module autoloading works.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ie33ffd25261376f55a16ae5a34ee0fafdb6e6cd6
This commit is contained in:
@@ -351,12 +351,19 @@ static const struct of_device_id spi_codec_device_id[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, spi_codec_device_id);
|
||||
|
||||
static const struct spi_device_id spi_codec_id[] = {
|
||||
{ "spi-codec" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, spi_codec_id);
|
||||
|
||||
static struct spi_driver spi_codec_driver = {
|
||||
.driver = {
|
||||
.name = "spi_codec",
|
||||
.name = "spi-codec",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_match_ptr(spi_codec_device_id),
|
||||
},
|
||||
.id_table = spi_codec_id,
|
||||
.probe = spi_codec_probe,
|
||||
.remove = spi_codec_remove,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user