public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Paul Mundt <lethal@linux-sh.org>, linux-sh@vger.kernel.org
Subject: [RFC][PATCH 13/14] Convert sh to read/update_persistent_clock
Date: Wed, 23 Dec 2009 04:15:03 +0000	[thread overview]
Message-ID: <1261541703.3508.75.camel@localhost.localdomain> (raw)
In-Reply-To: <1261541643.3508.74.camel@localhost.localdomain>

This patch converts the sh architecture to use the generic
read_persistent_clock and update_persistent_clock interfaces, reducing
the amount of arch specific code we have to maintain, and allowing for
further cleanups in the future.

I have not built or tested this patch, so help from arch maintainers
would be appreciated.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
---
 time.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)


Index: gettimeoffset/arch/sh/kernel/time.c
=================================--- gettimeoffset.orig/arch/sh/kernel/time.c	2009-12-22 18:50:55.000000000 -0800
+++ gettimeoffset/arch/sh/kernel/time.c	2009-12-22 18:51:12.000000000 -0800
@@ -39,12 +39,12 @@ static int null_rtc_set_time(const time_
 void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time;
 int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time;
 
-#ifdef CONFIG_GENERIC_CMOS_UPDATE
 void read_persistent_clock(struct timespec *ts)
 {
 	rtc_sh_get_time(ts);
 }
 
+#ifdef CONFIG_GENERIC_CMOS_UPDATE
 int update_persistent_clock(struct timespec now)
 {
 	return rtc_sh_set_time(now.tv_sec);
@@ -113,9 +113,5 @@ void __init time_init(void)
 	hwblk_init();
 	clk_init();
 
-	rtc_sh_get_time(&xtime);
-	set_normalized_timespec(&wall_to_monotonic,
-				-xtime.tv_sec, -xtime.tv_nsec);
-
 	late_time_init = sh_late_time_init;
 }



       reply	other threads:[~2009-12-23  4:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1261540762.3508.61.camel@localhost.localdomain>
     [not found] ` <1261540826.3508.62.camel@localhost.localdomain>
     [not found]   ` <1261540902.3508.63.camel@localhost.localdomain>
     [not found]     ` <1261540988.3508.64.camel@localhost.localdomain>
     [not found]       ` <1261541054.3508.65.camel@localhost.localdomain>
     [not found]         ` <1261541130.3508.66.camel@localhost.localdomain>
     [not found]           ` <1261541188.3508.67.camel@localhost.localdomain>
     [not found]             ` <1261541286.3508.69.camel@localhost.localdomain>
     [not found]               ` <1261541342.3508.70.camel@localhost.localdomain>
     [not found]                 ` <1261541415.3508.71.camel@localhost.localdomain>
     [not found]                   ` <1261541491.3508.72.camel@localhost.localdomain>
     [not found]                     ` <1261541567.3508.73.camel@localhost.localdomain>
     [not found]                       ` <1261541643.3508.74.camel@localhost.localdomain>
2009-12-23  4:15                         ` john stultz [this message]
2009-12-23  5:08 ` [RFC][PATCH 0/14] Convert remaining arches to read/update_persistent_clock Paul Mundt
2009-12-23 10:08   ` [RFC][PATCH 0/14] Convert remaining arches to Geert Uytterhoeven
2009-12-23 22:04   ` john stultz
2009-12-24  0:27     ` [RFC][PATCH 0/14] Convert remaining arches to read/update_persistent_clock Dialup Jon Norstog
2009-12-24  4:54   ` [RFC][PATCH 0/14] Convert remaining arches to David Miller
2009-12-24  5:10     ` [RFC][PATCH 0/14] Convert remaining arches to read/update_persistent_clock Paul Mundt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1261541703.3508.75.camel@localhost.localdomain \
    --to=johnstul@us.ibm.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox