From f9bf089a70aab6baac745843b44c152084848f5e Mon Sep 17 00:00:00 2001 From: Daniel Gomez Date: Mon, 22 Apr 2019 21:08:52 +0200 Subject: [PATCH] rtc: rx6110: declare missing of table Add missing 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/rtc/rtc-rx6110.ko | grep alias alias: spi:rx6110 After this patch: modinfo drivers/rtc/rtc-rx6110.ko | grep alias alias: spi:rx6110 alias: of:N*T*Cepson,rx6110C* alias: of:N*T*Cepson,rx6110 Reported-by: Javier Martinez Canillas Signed-off-by: Daniel Gomez Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rx6110.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/rtc/rtc-rx6110.c b/drivers/rtc/rtc-rx6110.c index 5899ca368d59..71e20a6bd387 100644 --- a/drivers/rtc/rtc-rx6110.c +++ b/drivers/rtc/rtc-rx6110.c @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include /* RX-6110 Register definitions */ @@ -379,9 +381,16 @@ static const struct spi_device_id rx6110_id[] = { }; MODULE_DEVICE_TABLE(spi, rx6110_id); +static const struct of_device_id rx6110_spi_of_match[] = { + { .compatible = "epson,rx6110" }, + { }, +}; +MODULE_DEVICE_TABLE(of, rx6110_spi_of_match); + static struct spi_driver rx6110_driver = { .driver = { .name = RX6110_DRIVER_NAME, + .of_match_table = of_match_ptr(rx6110_spi_of_match), }, .probe = rx6110_probe, .remove = rx6110_remove, -- 2.30.2