It doesn't make sense to set the RTC to a default value at probe time. Let
the core handle invalid date and time.
Also, this is basically dead code since commit 22652ba72453 ("rtc: stop
validating rtc_time in .read_time")
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-s3c.c | 15 ---------------
1 file changed, 15 deletions(-)
@@ -382,7 +382,6 @@ static int s3c_rtc_remove(struct platform_device *pdev)staticints3c_rtc_probe(structplatform_device*pdev){structs3c_rtc*info=NULL;-structrtc_timertc_tm;intret;info=devm_kzalloc(&pdev->dev,sizeof(*info),GFP_KERNEL);
@@ -448,20 +447,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)device_init_wakeup(&pdev->dev,1);-/* Check RTC Time */-if(s3c_rtc_gettime(&pdev->dev,&rtc_tm)){-rtc_tm.tm_year=100;-rtc_tm.tm_mon=0;-rtc_tm.tm_mday=1;-rtc_tm.tm_hour=0;-rtc_tm.tm_min=0;-rtc_tm.tm_sec=0;--s3c_rtc_settime(&pdev->dev,&rtc_tm);--dev_warn(&pdev->dev,"warning: invalid RTC value so initializing it\n");-}-/* register RTC and exit */info->rtc=devm_rtc_device_register(&pdev->dev,"s3c",&s3c_rtcops,THIS_MODULE);
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-s3c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2021-02-02 12:07:06
On Tue, Feb 02, 2021 at 12:29:33PM +0100, Alexandre Belloni wrote:
It doesn't make sense to set the RTC to a default value at probe time. Let
the core handle invalid date and time.
Also, this is basically dead code since commit 22652ba72453 ("rtc: stop
validating rtc_time in .read_time")
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-s3c.c | 15 ---------------
1 file changed, 15 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2021-02-02 12:07:56
On Tue, Feb 02, 2021 at 12:29:34PM +0100, Alexandre Belloni wrote:
When CONFIG_OF is disabled then the matching table is not referenced.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-s3c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof