aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-28 17:04:00 -0500
committerLen Brown <len.brown@intel.com>2006-04-01 22:07:51 -0500
commit9224a867c497053842dc595e594ca6d32112221f (patch)
treec952060abbe5563f15bd7cd69531d4fad3a9aafa /drivers/char/hpet.c
parent459c7266d7a5c1730169258217e25fdd1b7ca854 (diff)
HPET: fix ACPI memory range length handling
ACPI address space descriptors contain _MIN, _MAX, and _LEN. _MIN and _MAX are the bounds within which the region can be moved (this is clarified in Table 6-38 of the ACPI 3.0 spec). We should use _LEN to determine the size of the region, not _MAX - _MIN + 1. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index ef140ebde117..07473cd84121 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -925,11 +925,8 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
925 status = acpi_resource_to_address64(res, &addr); 925 status = acpi_resource_to_address64(res, &addr);
926 926
927 if (ACPI_SUCCESS(status)) { 927 if (ACPI_SUCCESS(status)) {
928 unsigned long size;
929
930 size = addr.maximum - addr.minimum + 1;
931 hdp->hd_phys_address = addr.minimum; 928 hdp->hd_phys_address = addr.minimum;
932 hdp->hd_address = ioremap(addr.minimum, size); 929 hdp->hd_address = ioremap(addr.minimum, addr.address_length);
933 930
934 if (hpet_is_known(hdp)) { 931 if (hpet_is_known(hdp)) {
935 printk(KERN_DEBUG "%s: 0x%lx is busy\n", 932 printk(KERN_DEBUG "%s: 0x%lx is busy\n",