Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
rtc: rx6110: declare missing of table
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dkruces authored and alexandrebelloni committed Apr 29, 2019
1 parent 498ce4e commit f9bf089
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/rtc/rtc-rx6110.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include <linux/of_gpio.h>
#include <linux/regmap.h>
#include <linux/rtc.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/spi/spi.h>

/* RX-6110 Register definitions */
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f9bf089

Please sign in to comment.