Commit d0483053 authored by Daniel Gomez's avatar Daniel Gomez Committed by David S. Miller

spi: ST ST95HF NFC: 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 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: default avatarJavier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: default avatarDaniel Gomez <dagmcr@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2f23a2a7
...@@ -1074,6 +1074,12 @@ static const struct spi_device_id st95hf_id[] = { ...@@ -1074,6 +1074,12 @@ static const struct spi_device_id st95hf_id[] = {
}; };
MODULE_DEVICE_TABLE(spi, 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) static int st95hf_probe(struct spi_device *nfc_spi_dev)
{ {
int ret; int ret;
...@@ -1260,6 +1266,7 @@ static struct spi_driver st95hf_driver = { ...@@ -1260,6 +1266,7 @@ static struct spi_driver st95hf_driver = {
.driver = { .driver = {
.name = "st95hf", .name = "st95hf",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = of_match_ptr(st95hf_spi_of_match),
}, },
.id_table = st95hf_id, .id_table = st95hf_id,
.probe = st95hf_probe, .probe = st95hf_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment