]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] hpet: fix access to multiple HPET devices
authorClemens Ladisch <clemens@ladisch.de>
Sun, 30 Oct 2005 23:03:39 +0000 (15:03 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:30 +0000 (17:37 -0800)
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>
drivers/char/hpet.c

index 73e6614cdf848d66b12a79ff322830d7ac022216..cdf2ec842e2c247161eebc1a8a2a3fcc7f27869a 100644 (file)
@@ -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;