diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-05-20 22:27:30 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-05-21 22:33:52 +0200 |
commit | ded676666f90882181fa004a43bcb84294c2a5c8 (patch) | |
tree | 571ec6fcd94772a7e3b1ef8d52b26a45f408d313 /drivers/rtc/rtc-brcmstb-waketimer.c | |
parent | 2abf286a20e338f2e105a2d19dfabec8927faa92 (diff) |
rtc: brcmstb-waketimer: add range
Let the core handle the range.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-brcmstb-waketimer.c')
-rw-r--r-- | drivers/rtc/rtc-brcmstb-waketimer.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-brcmstb-waketimer.c b/drivers/rtc/rtc-brcmstb-waketimer.c index ba49d9bcff12..f4010a75f2be 100644 --- a/drivers/rtc/rtc-brcmstb-waketimer.c +++ b/drivers/rtc/rtc-brcmstb-waketimer.c @@ -145,9 +145,6 @@ static int brcmstb_waketmr_settime(struct device *dev, sec = rtc_tm_to_time64(tm); - if (sec > U32_MAX || sec < 0) - return -EINVAL; - writel_relaxed(sec, timer->base + BRCMSTB_WKTMR_COUNTER); return 0; @@ -184,9 +181,6 @@ static int brcmstb_waketmr_setalarm(struct device *dev, else sec = 0; - if (sec > U32_MAX || sec < 0) - return -EINVAL; - brcmstb_waketmr_set_alarm(timer, sec); return 0; @@ -266,6 +260,7 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev) register_reboot_notifier(&timer->reboot_notifier); timer->rtc->ops = &brcmstb_waketmr_ops; + timer->rtc->range_max = U32_MAX; ret = rtc_register_device(timer->rtc); if (ret) { |