hpet: /dev/hpet - fixes and cleanup, fix

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, October 13, 2008 - 11:12 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f92a78...
Commit:     f92a789d259eb95afe7498ff5938fe2a93d39c82
Parent:     64a76f667d987a559ad0726b4692c987800b22bc
Author:     David Brownell <david-b@pacbell.net>
AuthorDate: Thu Jul 31 12:59:56 2008 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu Jul 31 22:49:58 2008 +0200

    hpet: /dev/hpet - fixes and cleanup, fix
    
    fix:
    
    On Thursday 31 July 2008, Ingo Molnar wrote:
    >   drivers/built-in.o: In function `hpet_alloc':
    >   : undefined reference to `__udivdi3'
    >   drivers/built-in.o: In function `hpet_alloc':
    >   : undefined reference to `__umoddi3'
    
    Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 drivers/char/hpet.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 4bc1da4..2908a0e 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -764,6 +764,7 @@ int hpet_alloc(struct hpet_data *hdp)
 	static struct hpets *last = NULL;
 	unsigned long period;
 	unsigned long long temp;
+	u32 remainder;
 
 	/*
 	 * hpet_alloc can be called by platform dependent code.
@@ -827,12 +828,13 @@ int hpet_alloc(struct hpet_data *hdp)
 		printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]);
 	printk("\n");
 
+	temp = hpetp->hp_tick_freq;
+	remainder = do_div(temp, 1000000);
 	printk(KERN_INFO
 		"hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n",
 		hpetp->hp_which, hpetp->hp_ntimer,
 		cap & HPET_COUNTER_SIZE_MASK ? 64 : 32,
-		(unsigned) (hpetp->hp_tick_freq / 1000000),
-		(unsigned) (hpetp->hp_tick_freq % 1000000));
+		(unsigned) temp, remainder);
 
 	mcfg = readq(&hpet->hpet_config);
 	if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
hpet: /dev/hpet - fixes and cleanup, fix, Linux Kernel Mailing ..., (Mon Oct 13, 11:12 am)