[PATCH 5/7] HPET: fix access to multiple HPET devices

From: Clemens Ladisch
Date: Tue Oct 04 2005 - 07:44:57 EST


From: Clemens Ladisch <clemens@xxxxxxxxxx>

Fix two instances where a function would access the first HPET device
instead of the current one.

Signed-off-by: Clemens Ladisch <clemens@xxxxxxxxxx>

Index: linux-2.6.13/drivers/char/hpet.c
===================================================================
--- linux-2.6.13.orig/drivers/char/hpet.c 2005-10-03 22:53:18.000000000 +0200
+++ linux-2.6.13/drivers/char/hpet.c 2005-10-03 22:53:21.000000000 +0200
@@ -430,7 +430,7 @@ static int hpet_ioctl_ieon(struct hpet_d
}

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(stru
if (!timer)
return 0;

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

i = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/