From fda9909ddaab13fb7b35b94f204623c1f9571fc7 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. Signed-off-by: Josh Cartwright Reviewed-by: Stephen Boyd Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 6e3cd345379d..197699f358c7 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -429,6 +429,8 @@ static int 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 = devm_rtc_device_register(&pdev->dev, "pm8xxx_rtc", &pm8xxx_rtc_ops, THIS_MODULE); @@ -448,8 +450,6 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) return rc; } - device_init_wakeup(&pdev->dev, 1); - dev_dbg(&pdev->dev, "Probe success !!\n"); return 0; -- 2.20.1