Commit f92a789d authored by David Brownell's avatar David Brownell Committed by Ingo Molnar

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 64a76f66
...@@ -764,6 +764,7 @@ int hpet_alloc(struct hpet_data *hdp) ...@@ -764,6 +764,7 @@ int hpet_alloc(struct hpet_data *hdp)
static struct hpets *last = NULL; static struct hpets *last = NULL;
unsigned long period; unsigned long period;
unsigned long long temp; unsigned long long temp;
u32 remainder;
/* /*
* hpet_alloc can be called by platform dependent code. * hpet_alloc can be called by platform dependent code.
...@@ -827,12 +828,13 @@ int hpet_alloc(struct hpet_data *hdp) ...@@ -827,12 +828,13 @@ int hpet_alloc(struct hpet_data *hdp)
printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]); printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]);
printk("\n"); printk("\n");
temp = hpetp->hp_tick_freq;
remainder = do_div(temp, 1000000);
printk(KERN_INFO printk(KERN_INFO
"hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n", "hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n",
hpetp->hp_which, hpetp->hp_ntimer, hpetp->hp_which, hpetp->hp_ntimer,
cap & HPET_COUNTER_SIZE_MASK ? 64 : 32, cap & HPET_COUNTER_SIZE_MASK ? 64 : 32,
(unsigned) (hpetp->hp_tick_freq / 1000000), (unsigned) temp, remainder);
(unsigned) (hpetp->hp_tick_freq % 1000000));
mcfg = readq(&hpet->hpet_config); mcfg = readq(&hpet->hpet_config);
if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) { if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment