diff options
author | Daniel Gomez <dagmcr@gmail.com> | 2019-04-22 21:08:04 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-16 19:43:43 +0200 |
commit | 737b6bcd08e676d67316e8e20b02efeaa1f1f2c4 (patch) | |
tree | 253e47cb3b52bb84228adf312f1e741d1da21621 | |
parent | cdb3d71607a3dbac7074e50b149cd10b8d27dbd5 (diff) | |
download | linux-stable-737b6bcd08e676d67316e8e20b02efeaa1f1f2c4.tar.gz linux-stable-737b6bcd08e676d67316e8e20b02efeaa1f1f2c4.tar.bz2 linux-stable-737b6bcd08e676d67316e8e20b02efeaa1f1f2c4.zip |
spi: ST ST95HF NFC: declare missing of table
[ Upstream commit d04830531d0c4a99c897a44038e5da3d23331d2f ]
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 drivers/nfc/st95hf/st95hf.ko | grep alias
alias: spi:st95hf
After this patch:
modinfo drivers/nfc/st95hf/st95hf.ko | grep alias
alias: spi:st95hf
alias: of:N*T*Cst,st95hfC*
alias: of:N*T*Cst,st95hf
Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Daniel Gomez <dagmcr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/nfc/st95hf/core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c index c2840e412962..850e75571c8e 100644 --- a/drivers/nfc/st95hf/core.c +++ b/drivers/nfc/st95hf/core.c @@ -1074,6 +1074,12 @@ static const struct spi_device_id st95hf_id[] = { }; MODULE_DEVICE_TABLE(spi, st95hf_id); +static const struct of_device_id st95hf_spi_of_match[] = { + { .compatible = "st,st95hf" }, + { }, +}; +MODULE_DEVICE_TABLE(of, st95hf_spi_of_match); + static int st95hf_probe(struct spi_device *nfc_spi_dev) { int ret; @@ -1260,6 +1266,7 @@ static struct spi_driver st95hf_driver = { .driver = { .name = "st95hf", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(st95hf_spi_of_match), }, .id_table = st95hf_id, .probe = st95hf_probe, |