Skip to content

Commit f92a789

Browse files
David BrownellIngo Molnar
authored andcommitted
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>
1 parent 64a76f6 commit f92a789

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/char/hpet.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ int hpet_alloc(struct hpet_data *hdp)
764764
static struct hpets *last = NULL;
765765
unsigned long period;
766766
unsigned long long temp;
767+
u32 remainder;
767768

768769
/*
769770
* hpet_alloc can be called by platform dependent code.
@@ -827,12 +828,13 @@ int hpet_alloc(struct hpet_data *hdp)
827828
printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]);
828829
printk("\n");
829830

831+
temp = hpetp->hp_tick_freq;
832+
remainder = do_div(temp, 1000000);
830833
printk(KERN_INFO
831834
"hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n",
832835
hpetp->hp_which, hpetp->hp_ntimer,
833836
cap & HPET_COUNTER_SIZE_MASK ? 64 : 32,
834-
(unsigned) (hpetp->hp_tick_freq / 1000000),
835-
(unsigned) (hpetp->hp_tick_freq % 1000000));
837+
(unsigned) temp, remainder);
836838

837839
mcfg = readq(&hpet->hpet_config);
838840
if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) {

0 commit comments

Comments
 (0)