From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-rtc@vger.kernel.org, Tin Huynh <tnhuynh@apm.com>,
linux-acpi@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 3/3] rtc: ds1307: Drop of_match_ptr and CONFIG_OF protections
Date: Thu, 12 Nov 2020 17:57:53 +0200 [thread overview]
Message-ID: <20201112155753.36834-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20201112155753.36834-1-andriy.shevchenko@linux.intel.com>
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/rtc/rtc-ds1307.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 40300c872337..1d8b711ec90e 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -11,8 +11,8 @@
#include <linux/bcd.h>
#include <linux/i2c.h>
#include <linux/init.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of.h>
#include <linux/property.h>
#include <linux/rtc/ds1307.h>
#include <linux/rtc.h>
@@ -1091,7 +1091,6 @@ static const struct i2c_device_id ds1307_id[] = {
};
MODULE_DEVICE_TABLE(i2c, ds1307_id);
-#ifdef CONFIG_OF
static const struct of_device_id ds1307_of_match[] = {
{
.compatible = "dallas,ds1307",
@@ -1168,7 +1167,6 @@ static const struct of_device_id 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
@@ -2036,7 +2034,7 @@ static int ds1307_probe(struct i2c_client *client,
static struct i2c_driver ds1307_driver = {
.driver = {
.name = "rtc-ds1307",
- .of_match_table = of_match_ptr(ds1307_of_match),
+ .of_match_table = ds1307_of_match,
},
.probe = ds1307_probe,
.id_table = ds1307_id,
--
2.28.0
next prev parent reply other threads:[~2020-11-12 15:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 15:57 [PATCH v1 1/3] rtc: ds1307: Remove non-valid ACPI IDs Andy Shevchenko
2020-11-12 15:57 ` [PATCH v1 2/3] rtc: ds1307: Make use of device properties Andy Shevchenko
2020-11-12 16:26 ` Andy Shevchenko
2020-11-12 15:57 ` Andy Shevchenko [this message]
2020-11-12 16:36 ` [PATCH v1 1/3] rtc: ds1307: Remove non-valid ACPI IDs Alexandre Belloni
2020-11-12 17:16 ` Andy Shevchenko
2020-11-12 19:01 ` Rafael J. Wysocki
2020-11-13 14:11 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201112155753.36834-3-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=tnhuynh@apm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).