Skip to contentSkip to conversation

rtc: palmas: init wakeup before device register

PATCH New Wei Ni 1 participant 1 message Jun 26, 2013 Real time clock (RTC)

lore
Share & tools
lore

Wei Ni

author
#0 lore raw

PATCH 1/1 rtc: palmas: init wakeup before device register

Enable dev as wakeup device before calling rtc_device_register(), so that it can create the "wakealarm" sysfs.

---
 drivers/rtc/rtc-palmas.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-palmas.c +1 -1
index 50204d4..a1fecc8 100644
@@ -265,6 +265,7 @@ static int palmas_rtc_probe(struct platform_device *pdev)
 
 	palmas_rtc->irq = platform_get_irq(pdev, 0);
 
+	device_init_wakeup(&pdev->dev, 1);
 	palmas_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 				&palmas_rtc_ops, THIS_MODULE);
 	if (IS_ERR(palmas_rtc->rtc)) {
@@ -283,7 +284,6 @@ static int palmas_rtc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	device_set_wakeup_capable(&pdev->dev, 1);
 	return 0;
 }
 
Signature · 1 line
1.7.9.5