Skip to content

Commit

Permalink
rtc: ds1390: Add OF device ID table
Browse files Browse the repository at this point in the history
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. Worse, the compatible is documented but
doesn't currently match the driver.

Add the proper compatible to the driver.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
  • Loading branch information
alexandrebelloni committed Oct 27, 2017
1 parent 47dd472 commit 3ba2c76
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/rtc/rtc-ds1390.c
Expand Up @@ -216,9 +216,16 @@ static int ds1390_probe(struct spi_device *spi)
return res;
}

static const struct of_device_id ds1390_of_match[] = {
{ .compatible = "dallas,ds1390" },
{}
};
MODULE_DEVICE_TABLE(of, ds1390_of_match);

static struct spi_driver ds1390_driver = {
.driver = {
.name = "rtc-ds1390",
.of_match_table = of_match_ptr(ds1390_of_match),
},
.probe = ds1390_probe,
};
Expand Down

0 comments on commit 3ba2c76

Please sign in to comment.