From b4b7ff4b08e691656c9d77c758fc355833128ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Wed, 20 Jan 2016 14:01:31 -0300 Subject: Linux-libre 4.4-gnu --- drivers/rtc/rtc-opal.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/rtc/rtc-opal.c') diff --git a/drivers/rtc/rtc-opal.c b/drivers/rtc/rtc-opal.c index 6fbf9e617..df39ce02a 100644 --- a/drivers/rtc/rtc-opal.c +++ b/drivers/rtc/rtc-opal.c @@ -152,10 +152,10 @@ exit: /* Set Timed Power-On */ static int opal_set_tpo_time(struct device *dev, struct rtc_wkalrm *alarm) { - u64 h_m_s_ms = 0, token; + u64 h_m_s_ms = 0; struct opal_msg msg; u32 y_m_d = 0; - int rc; + int token, rc; tm_to_opal(&alarm->time, &y_m_d, &h_m_s_ms); @@ -199,8 +199,9 @@ static int opal_rtc_probe(struct platform_device *pdev) { struct rtc_device *rtc; - if (pdev->dev.of_node && of_get_property(pdev->dev.of_node, "has-tpo", - NULL)) { + if (pdev->dev.of_node && + (of_property_read_bool(pdev->dev.of_node, "wakeup-source") || + of_property_read_bool(pdev->dev.of_node, "has-tpo")/* legacy */)) { device_set_wakeup_capable(&pdev->dev, true); opal_rtc_ops.read_alarm = opal_get_tpo_time; opal_rtc_ops.set_alarm = opal_set_tpo_time; -- cgit v1.2.3