summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2024-09-12 00:48:36 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2024-09-22 01:17:10 +0200
commitb242650dfa17d8591d92e8e151438d1f8e54997a (patch)
treee7ce838111b7fe617a2a4ded512cc5feaa045c8e /drivers
parent4015580e983daa699d7e1693328dd81f0e295589 (diff)
rtc: m48t59: set range
The m48t59 leap year calculation will fail in 2100 Link: https://lore.kernel.org/r/20240911224836.1571831-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-m48t59.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index cd2ca49805d8..5d30ce8e13ca 100644
--- a/drivers/rtc/rtc-m48t59.c
+++ b/drivers/rtc/rtc-m48t59.c
@@ -458,6 +458,8 @@ static int m48t59_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, m48t59);
m48t59->rtc->ops = &m48t59_rtc_ops;
+ m48t59->rtc->range_min = RTC_TIMESTAMP_BEGIN_1900;
+ m48t59->rtc->range_max = RTC_TIMESTAMP_END_2099;
nvmem_cfg.size = pdata->offset;
ret = devm_rtc_nvmem_register(m48t59->rtc, &nvmem_cfg);