Commit 698fffc2 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Alexandre Belloni

rtc: ds1307: Drop of_match_ptr and CONFIG_OF protections

These prevent use of this driver with ACPI via PRP0001.
Drop them to remove this restriction.

Also added mod_devicetable.h include given use of struct of_device_id.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201116142859.31257-3-andriy.shevchenko@linux.intel.com
parent 227ec129
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#include <linux/bcd.h> #include <linux/bcd.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h>
#include <linux/property.h> #include <linux/property.h>
#include <linux/rtc/ds1307.h> #include <linux/rtc/ds1307.h>
#include <linux/rtc.h> #include <linux/rtc.h>
...@@ -1091,7 +1091,6 @@ static const struct i2c_device_id ds1307_id[] = { ...@@ -1091,7 +1091,6 @@ static const struct i2c_device_id ds1307_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, ds1307_id); MODULE_DEVICE_TABLE(i2c, ds1307_id);
#ifdef CONFIG_OF
static const struct of_device_id ds1307_of_match[] = { static const struct of_device_id ds1307_of_match[] = {
{ {
.compatible = "dallas,ds1307", .compatible = "dallas,ds1307",
...@@ -1168,7 +1167,6 @@ static const struct of_device_id ds1307_of_match[] = { ...@@ -1168,7 +1167,6 @@ static const struct of_device_id ds1307_of_match[] = {
{ } { }
}; };
MODULE_DEVICE_TABLE(of, ds1307_of_match); MODULE_DEVICE_TABLE(of, ds1307_of_match);
#endif
/* /*
* The ds1337 and ds1339 both have two alarms, but we only use the first * The ds1337 and ds1339 both have two alarms, but we only use the first
...@@ -2035,7 +2033,7 @@ static int ds1307_probe(struct i2c_client *client, ...@@ -2035,7 +2033,7 @@ static int ds1307_probe(struct i2c_client *client,
static struct i2c_driver ds1307_driver = { static struct i2c_driver ds1307_driver = {
.driver = { .driver = {
.name = "rtc-ds1307", .name = "rtc-ds1307",
.of_match_table = of_match_ptr(ds1307_of_match), .of_match_table = ds1307_of_match,
}, },
.probe = ds1307_probe, .probe = ds1307_probe,
.id_table = ds1307_id, .id_table = ds1307_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment