rtc: starfire: set range

The starfire RTC is a 32bit seconds counter.

Link: https://lore.kernel.org/r/20200306005910.38939-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
Alexandre Belloni 2020-03-06 01:59:09 +01:00
parent c33c4713cd
commit 166b13325c
1 changed files with 5 additions and 3 deletions

View File

@ -39,14 +39,16 @@ static int __init starfire_rtc_probe(struct platform_device *pdev)
{
struct rtc_device *rtc;
rtc = devm_rtc_device_register(&pdev->dev, "starfire",
&starfire_rtc_ops, THIS_MODULE);
rtc = devm_rtc_allocate_device(&pdev->dev);
if (IS_ERR(rtc))
return PTR_ERR(rtc);
rtc->ops = &starfire_rtc_ops;
rtc->range_max = U32_MAX;
platform_set_drvdata(pdev, rtc);
return 0;
return rtc_register_device(rtc);
}
static struct platform_driver starfire_rtc_driver = {