From b6b2e3f88569ab5cbc7f3acd94958373611969d4 Mon Sep 17 00:00:00 2001 From: Josh Cartwright Date: Thu, 3 Apr 2014 14:50:14 -0700 Subject: [PATCH] rtc: pm8xxx: move device_init_wakeup() before rtc_register Setup wakeup capability before rtc_register to ensure the rtc class core properly sets up our 'wakealarm' sysfs attribute. Change-Id: I87e09a6f9f3a593ddf2b9bf9fedfaeb1711d79b3 Signed-off-by: Josh Cartwright Reviewed-by: Stephen Boyd Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Kevin F. Haggerty --- drivers/rtc/rtc-pm8xxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index 8097e69f2f7..cb2edaef75d 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -461,6 +461,8 @@ static int __devinit pm8xxx_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rtc_dd); + device_init_wakeup(&pdev->dev, 1); + /* Register the RTC device */ rtc_dd->rtc = rtc_device_register("pm8xxx_rtc", &pdev->dev, &pm8xxx_rtc_ops, THIS_MODULE); @@ -480,8 +482,6 @@ static int __devinit pm8xxx_rtc_probe(struct platform_device *pdev) goto fail_req_irq; } - device_init_wakeup(&pdev->dev, 1); - dev_dbg(&pdev->dev, "Probe success !!\n"); return 0;