Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <joshc@codeaurora.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Josh Cartwright and committed by
Linus Torvalds
fda9909d 5a418558

+2 -2
+2 -2
drivers/rtc/rtc-pm8xxx.c
··· 429 429 430 430 platform_set_drvdata(pdev, rtc_dd); 431 431 432 + device_init_wakeup(&pdev->dev, 1); 433 + 432 434 /* Register the RTC device */ 433 435 rtc_dd->rtc = devm_rtc_device_register(&pdev->dev, "pm8xxx_rtc", 434 436 &pm8xxx_rtc_ops, THIS_MODULE); ··· 449 447 dev_err(&pdev->dev, "Request IRQ failed (%d)\n", rc); 450 448 return rc; 451 449 } 452 - 453 - device_init_wakeup(&pdev->dev, 1); 454 450 455 451 dev_dbg(&pdev->dev, "Probe success !!\n"); 456 452