From: Curtis Klein <curtis.klein@hpe.com>
To: alexandre.belloni@bootlin.com, linux-rtc@vger.kernel.org
Cc: trivial@kernel.org, Curtis Klein <curtis.klein@hpe.com>
Subject: [PATCH] rtc: m41t80: Use the unified property API get the wakeup-source property
Date: Wed, 21 Feb 2024 17:11:29 -0800 [thread overview]
Message-ID: <20240222011129.79241-1-curtis.klein@hpe.com> (raw)
This allows both ACPI and Device Tree systems to specify the m41t80 as a
wakeup-source.
Signed-off-by: Curtis Klein <curtis.klein@hpe.com>
---
drivers/rtc/rtc-m41t80.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index 866489ad56d6..0013bff0447d 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -909,10 +909,7 @@ static int m41t80_probe(struct i2c_client *client)
if (IS_ERR(m41t80_data->rtc))
return PTR_ERR(m41t80_data->rtc);
-#ifdef CONFIG_OF
- wakeup_source = of_property_read_bool(client->dev.of_node,
- "wakeup-source");
-#endif
+ wakeup_source = device_property_read_bool(&client->dev, "wakeup-source");
if (client->irq > 0) {
unsigned long irqflags = IRQF_TRIGGER_LOW;
--
2.31.1
next reply other threads:[~2024-02-22 1:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 1:11 Curtis Klein [this message]
2024-02-29 21:29 ` [PATCH] rtc: m41t80: Use the unified property API get the wakeup-source property Alexandre Belloni
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=20240222011129.79241-1-curtis.klein@hpe.com \
--to=curtis.klein@hpe.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-rtc@vger.kernel.org \
--cc=trivial@kernel.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).