diff options
author | Daniel Gomez <dagmcr@gmail.com> | 2019-04-22 15:08:52 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-29 09:53:42 -0400 |
commit | f9bf089a70aab6baac745843b44c152084848f5e (patch) | |
tree | b9630f983e30dac68c330cb37baead6287c1e676 | |
parent | 498ce4e76b2d5b1dd56b478c967fcfef5b20c1b8 (diff) |
rtc: rx6110: 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/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 <javier@dowhile0.org>
Signed-off-by: Daniel Gomez <dagmcr@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | drivers/rtc/rtc-rx6110.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ | |||
21 | #include <linux/of_gpio.h> | 21 | #include <linux/of_gpio.h> |
22 | #include <linux/regmap.h> | 22 | #include <linux/regmap.h> |
23 | #include <linux/rtc.h> | 23 | #include <linux/rtc.h> |
24 | #include <linux/of.h> | ||
25 | #include <linux/of_device.h> | ||
24 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
25 | 27 | ||
26 | /* RX-6110 Register definitions */ | 28 | /* RX-6110 Register definitions */ |
@@ -379,9 +381,16 @@ static const struct spi_device_id rx6110_id[] = { | |||
379 | }; | 381 | }; |
380 | MODULE_DEVICE_TABLE(spi, rx6110_id); | 382 | MODULE_DEVICE_TABLE(spi, rx6110_id); |
381 | 383 | ||
384 | static const struct of_device_id rx6110_spi_of_match[] = { | ||
385 | { .compatible = "epson,rx6110" }, | ||
386 | { }, | ||
387 | }; | ||
388 | MODULE_DEVICE_TABLE(of, rx6110_spi_of_match); | ||
389 | |||
382 | static struct spi_driver rx6110_driver = { | 390 | static struct spi_driver rx6110_driver = { |
383 | .driver = { | 391 | .driver = { |
384 | .name = RX6110_DRIVER_NAME, | 392 | .name = RX6110_DRIVER_NAME, |
393 | .of_match_table = of_match_ptr(rx6110_spi_of_match), | ||
385 | }, | 394 | }, |
386 | .probe = rx6110_probe, | 395 | .probe = rx6110_probe, |
387 | .remove = rx6110_remove, | 396 | .remove = rx6110_remove, |