diff options
| author | Josh Cartwright <joshc@codeaurora.org> | 2014-04-03 17:50:14 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 19:21:23 -0400 |
| commit | fda9909ddaab13fb7b35b94f204623c1f9571fc7 (patch) | |
| tree | 17a2be60c3cdf8214348e451c96ddfb0211a91d8 /drivers/rtc | |
| parent | 5a418558cdae4fd0699b7b6a960f03a8bb38a338 (diff) | |
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>
Diffstat (limited to 'drivers/rtc')
| -rw-r--r-- | drivers/rtc/rtc-pm8xxx.c | 4 |
1 files 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) | |||
| 429 | 429 | ||
| 430 | platform_set_drvdata(pdev, rtc_dd); | 430 | platform_set_drvdata(pdev, rtc_dd); |
| 431 | 431 | ||
| 432 | device_init_wakeup(&pdev->dev, 1); | ||
| 433 | |||
| 432 | /* Register the RTC device */ | 434 | /* Register the RTC device */ |
| 433 | rtc_dd->rtc = devm_rtc_device_register(&pdev->dev, "pm8xxx_rtc", | 435 | rtc_dd->rtc = devm_rtc_device_register(&pdev->dev, "pm8xxx_rtc", |
| 434 | &pm8xxx_rtc_ops, THIS_MODULE); | 436 | &pm8xxx_rtc_ops, THIS_MODULE); |
| @@ -448,8 +450,6 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) | |||
| 448 | return rc; | 450 | return rc; |
| 449 | } | 451 | } |
| 450 | 452 | ||
| 451 | device_init_wakeup(&pdev->dev, 1); | ||
| 452 | |||
| 453 | dev_dbg(&pdev->dev, "Probe success !!\n"); | 453 | dev_dbg(&pdev->dev, "Probe success !!\n"); |
| 454 | 454 | ||
| 455 | return 0; | 455 | return 0; |
