Skip to content

Commit

Permalink
[PATCH] hpet: fix access to multiple HPET devices
Browse files Browse the repository at this point in the history
Fix two instances where a function would access the first HPET device instead
of the current one.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Clemens Ladisch authored and Linus Torvalds committed Oct 31, 2005
1 parent 7522e4e commit 3d5640d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp)
}

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);
}
writeq(g, &timer->hpet_config);
Expand Down Expand Up @@ -769,7 +769,7 @@ static unsigned long hpet_calibrate(struct hpets *hpetp)
if (!timer)
return 0;

hpet = hpets->hp_hpet;
hpet = hpetp->hp_hpet;
t = read_counter(&timer->hpet_compare);

i = 0;
Expand Down

0 comments on commit 3d5640d

Please sign in to comment.