[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <0ca46228311ec615947e199def9fed62d70c1f07.1524118799.git.baolin.wang@linaro.org>
Date: Thu, 19 Apr 2018 14:22:20 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: geert@...ux-m68k.org
Cc: alexandre.belloni@...tlin.com, arnd@...db.de, broonie@...nel.org,
linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
baolin.wang@...aro.org
Subject: [PATCH] m68k: Remove read_persistent_clock()
The read_persistent_clock() uses a timespec, which is not year 2038 safe
on 32bit systems. Moreover on m68k architecture, we have implemented generic
RTC drivers that can be used to compensate the system suspend time. So
we can remove the obsolete read_persistent_clock().
Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
---
arch/m68k/kernel/time.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 97dd4e2..cb386d8 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -71,22 +71,6 @@ static irqreturn_t timer_interrupt(int irq, void *dummy)
return IRQ_HANDLED;
}
-void read_persistent_clock(struct timespec *ts)
-{
- struct rtc_time time;
- ts->tv_sec = 0;
- ts->tv_nsec = 0;
-
- if (mach_hwclk) {
- mach_hwclk(0, &time);
-
- if ((time.tm_year += 1900) < 1970)
- time.tm_year += 100;
- ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday,
- time.tm_hour, time.tm_min, time.tm_sec);
- }
-}
-
#if defined(CONFIG_ARCH_USES_GETTIMEOFFSET) && IS_ENABLED(CONFIG_RTC_DRV_GENERIC)
static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm)
{
--
1.7.9.5
Powered by blists - more mailing lists