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

drivers/rtc/rtc-tps6586x.c: device wakeup flags correction

Use device_init_wakeup() instead of device_set_wakeup_capable() and move
it before rtc dev registering. This fixes alarmtimer not registered
when tps6586x rtc is the only wakeup compatible rtc in the system.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Dmitry Osipenko and committed by
Linus Torvalds
5a280844 f101a946

+2 -1
+2 -1
drivers/rtc/rtc-tps6586x.c
··· 273 273 return ret; 274 274 } 275 275 276 + device_init_wakeup(&pdev->dev, 1); 277 + 276 278 platform_set_drvdata(pdev, rtc); 277 279 rtc->rtc = devm_rtc_device_register(&pdev->dev, dev_name(&pdev->dev), 278 280 &tps6586x_rtc_ops, THIS_MODULE); ··· 294 292 goto fail_rtc_register; 295 293 } 296 294 disable_irq(rtc->irq); 297 - device_set_wakeup_capable(&pdev->dev, 1); 298 295 return 0; 299 296 300 297 fail_rtc_register: