mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Stultz <johnstul@us.ibm.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: John Stultz <johnstul@us.ibm.com>,
	Haavard Skinnemoen <hskinnemoen@atmel.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 5/7] avr32: Convert to clocksource_register_hz
Date: Wed, 20 Oct 2010 16:44:11 -0700	[thread overview]
Message-ID: <1287618253-13258-6-git-send-email-johnstul@us.ibm.com> (raw)
In-Reply-To: <1287618253-13258-5-git-send-email-johnstul@us.ibm.com>

This converts the avr32 clocksource to use clocksource_register_hz.

This is untested, so any assistance in testing would be appreciated!

Signed-off-by: John Stultz <johnstul@us.ibm.com>
CC: Haavard Skinnemoen <hskinnemoen@atmel.com>
CC: Thomas Gleixner <tglx@linutronix.de>
---
 arch/avr32/kernel/time.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 668ed28..05ad291 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -35,7 +35,6 @@ static struct clocksource counter = {
 	.rating		= 50,
 	.read		= read_cycle_count,
 	.mask		= CLOCKSOURCE_MASK(32),
-	.shift		= 16,
 	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
@@ -123,9 +122,7 @@ void __init time_init(void)
 
 	/* figure rate for counter */
 	counter_hz = clk_get_rate(boot_cpu_data.clk);
-	counter.mult = clocksource_hz2mult(counter_hz, counter.shift);
-
-	ret = clocksource_register(&counter);
+	ret = clocksource_register_hz(&counter, counter_hz);
 	if (ret)
 		pr_debug("timer: could not register clocksource: %d\n", ret);
 
-- 
1.6.0.4


  reply	other threads:[~2010-10-20 23:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20 23:44 [PATCH 0/7] clocksource_register_khz/hz cleanups(for 2.6.37?) John Stultz
2010-10-20 23:44 ` [PATCH 1/7] x86: Convert remaining clocksources to clocksource_register_hz/khz John Stultz
2010-10-20 23:44   ` [PATCH 2/7] sh: convert to clocksource_register_hz John Stultz
2010-10-20 23:44     ` [PATCH 3/7] ia64: convert to clocksource_register_hz/khz John Stultz
2010-10-20 23:44       ` [PATCH 4/7] sparc: " John Stultz
2010-10-20 23:44         ` John Stultz [this message]
2010-10-20 23:44           ` [PATCH 6/7] mips: " John Stultz
2010-10-20 23:44             ` [PATCH 7/7] blackfin: convert to clocksource_register_hz John Stultz
2010-10-21  8:33         ` [PATCH 4/7] sparc: convert to clocksource_register_hz/khz David Miller
2010-10-21 19:16   ` [PATCH 1/7] x86: Convert remaining clocksources " Alok Kataria
2010-10-21 19:39     ` john stultz

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=1287618253-13258-6-git-send-email-johnstul@us.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=hskinnemoen@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome