mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 01:04:08 +08:00
rtc: jz4740: set range
RTC_SEC is a 32-bit seconds counter. Tested-by: Mathieu Malaterre <malat@debian.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
f22b1ba15e
commit
a7ab6bed28
@ -348,10 +348,18 @@ static int jz4740_rtc_probe(struct platform_device *pdev)
|
||||
|
||||
device_init_wakeup(&pdev->dev, 1);
|
||||
|
||||
rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
||||
&jz4740_rtc_ops, THIS_MODULE);
|
||||
rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
|
||||
if (IS_ERR(rtc->rtc)) {
|
||||
ret = PTR_ERR(rtc->rtc);
|
||||
dev_err(&pdev->dev, "Failed to allocate rtc device: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
rtc->rtc->ops = &jz4740_rtc_ops;
|
||||
rtc->rtc->range_max = U32_MAX;
|
||||
|
||||
ret = rtc_register_device(rtc->rtc);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to register rtc device: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user