From: Clemens Ladisch Date: Sun, 30 Oct 2005 23:03:39 +0000 (-0800) Subject: [PATCH] hpet: fix access to multiple HPET devices X-Git-Tag: v2.6.15-rc1~59^2~15^2~16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d5640d1c7584689227256beeb63354c9a5baf2d;p=linux-2.6 [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: Clemens Ladisch Cc: Bob Picco Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 73e6614cdf..cdf2ec842e 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -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); @@ -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;