Skip to content

Commit d048305

Browse files
dkrucesdavem330
authored andcommitted
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: Javier Martinez Canillas <[email protected]> Signed-off-by: Daniel Gomez <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2f23a2a commit d048305

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/nfc/st95hf/core.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,12 @@ static const struct spi_device_id st95hf_id[] = {
10741074
};
10751075
MODULE_DEVICE_TABLE(spi, st95hf_id);
10761076

1077+
static const struct of_device_id st95hf_spi_of_match[] = {
1078+
{ .compatible = "st,st95hf" },
1079+
{ },
1080+
};
1081+
MODULE_DEVICE_TABLE(of, st95hf_spi_of_match);
1082+
10771083
static int st95hf_probe(struct spi_device *nfc_spi_dev)
10781084
{
10791085
int ret;
@@ -1260,6 +1266,7 @@ static struct spi_driver st95hf_driver = {
12601266
.driver = {
12611267
.name = "st95hf",
12621268
.owner = THIS_MODULE,
1269+
.of_match_table = of_match_ptr(st95hf_spi_of_match),
12631270
},
12641271
.id_table = st95hf_id,
12651272
.probe = st95hf_probe,

0 commit comments

Comments
 (0)