aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index c85d11de5feb..bc5ee99b9c23 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -494,8 +494,11 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel)
494 { 494 {
495 struct hpet_info info; 495 struct hpet_info info;
496 496
497 info.hi_ireqfreq = hpet_time_div(hpetp, 497 if (devp->hd_ireqfreq)
498 devp->hd_ireqfreq); 498 info.hi_ireqfreq =
499 hpet_time_div(hpetp, devp->hd_ireqfreq);
500 else
501 info.hi_ireqfreq = 0;
499 info.hi_flags = 502 info.hi_flags =
500 readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK; 503 readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK;
501 info.hi_hpet = devp->hd_hpets->hp_which; 504 info.hi_hpet = devp->hd_hpets->hp_which;