Skip to contentSkip to conversation

rtc: m41t80: Use the unified property API get the wakeup-source property

PATCH Applied Curtis Klein 2 participants 2 messages Feb 22, 2024 – Feb 29, 2024 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: m41t80: Use the unified property API get the wakeup-source property

This allows both ACPI and Device Tree systems to specify the m41t80 as a wakeup-source.

---
 drivers/rtc/rtc-m41t80.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/rtc/rtc-m41t80.c +1 -4
index 866489ad56d6..0013bff0447d 100644
@@ -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;
 
Signature · 1 line
2.31.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Curtis Klein

This allows both ACPI and Device Tree systems to specify the m41t80 as a wakeup-source.

Applied, thanks!

[1/1] rtc: m41t80: Use the unified property API get the wakeup-source property

      https://git.kernel.org/abelloni/c/3100fd1aa8e4

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com