Commit 166b1332 authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: starfire: set range

The starfire RTC is a 32bit seconds counter.

Link: https://lore.kernel.org/r/20200306005910.38939-1-alexandre.belloni@bootlin.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent c33c4713
...@@ -39,14 +39,16 @@ static int __init starfire_rtc_probe(struct platform_device *pdev) ...@@ -39,14 +39,16 @@ static int __init starfire_rtc_probe(struct platform_device *pdev)
{ {
struct rtc_device *rtc; struct rtc_device *rtc;
rtc = devm_rtc_device_register(&pdev->dev, "starfire", rtc = devm_rtc_allocate_device(&pdev->dev);
&starfire_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc)) if (IS_ERR(rtc))
return PTR_ERR(rtc); return PTR_ERR(rtc);
rtc->ops = &starfire_rtc_ops;
rtc->range_max = U32_MAX;
platform_set_drvdata(pdev, rtc); platform_set_drvdata(pdev, rtc);
return 0; return rtc_register_device(rtc);
} }
static struct platform_driver starfire_rtc_driver = { static struct platform_driver starfire_rtc_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment