Commit 3d5640d1 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Linus Torvalds

[PATCH] hpet: fix access to multiple HPET devices

Fix two instances where a function would access the first HPET device instead
of the current one.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7522e4ec
...@@ -430,7 +430,7 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp) ...@@ -430,7 +430,7 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp)
} }
if (devp->hd_flags & HPET_SHARED_IRQ) { if (devp->hd_flags & HPET_SHARED_IRQ) {
isr = 1 << (devp - hpets->hp_dev); isr = 1 << (devp - devp->hd_hpets->hp_dev);
writel(isr, &hpet->hpet_isr); writel(isr, &hpet->hpet_isr);
} }
writeq(g, &timer->hpet_config); writeq(g, &timer->hpet_config);
...@@ -769,7 +769,7 @@ static unsigned long hpet_calibrate(struct hpets *hpetp) ...@@ -769,7 +769,7 @@ static unsigned long hpet_calibrate(struct hpets *hpetp)
if (!timer) if (!timer)
return 0; return 0;
hpet = hpets->hp_hpet; hpet = hpetp->hp_hpet;
t = read_counter(&timer->hpet_compare); t = read_counter(&timer->hpet_compare);
i = 0; i = 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