Pull release into acpica branch
authorLen Brown <len.brown@intel.com>
Tue, 6 Dec 2005 22:31:30 +0000 (17:31 -0500)
committerLen Brown <len.brown@intel.com>
Tue, 6 Dec 2005 22:31:30 +0000 (17:31 -0500)
1  2 
drivers/acpi/glue.c
drivers/char/hpet.c

index 00aeb4801d7a23028f57201b3df6615c89a3b2e3,aa993715d6445d40c6ca668616b8f203d35a6b2c..fcb881db5b0bf339e60fa8c6f33c41af670d64d8
@@@ -96,12 -96,12 +96,12 @@@ struct acpi_find_pci_root 
  static acpi_status
  do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
  {
-       int *busnr = (int *)data;
+       unsigned long *busnr = (unsigned long *)data;
        struct acpi_resource_address64 address;
  
 -      if (resource->id != ACPI_RSTYPE_ADDRESS16 &&
 -          resource->id != ACPI_RSTYPE_ADDRESS32 &&
 -          resource->id != ACPI_RSTYPE_ADDRESS64)
 +      if (resource->type != ACPI_RSTYPE_ADDRESS16 &&
 +          resource->type != ACPI_RSTYPE_ADDRESS32 &&
 +          resource->type != ACPI_RSTYPE_ADDRESS64)
                return AE_OK;
  
        acpi_resource_to_address64(resource, &address);
index a5c3f9c0c909906028b210091b9141cb035f68fc,3808d95726195d3bb5c18ab8946d77cc341d765b..5172d4e1236c02b0fd06ee20c7aefea34713678f
@@@ -894,10 -931,30 +931,30 @@@ static acpi_status hpet_resources(struc
                hdp->hd_phys_address = addr.min_address_range;
                hdp->hd_address = ioremap(addr.min_address_range, size);
  
-               for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
-                       if (hpetp->hp_hpet == hdp->hd_address)
-                               return -EBUSY;
+               if (hpet_is_known(hdp)) {
+                       printk(KERN_DEBUG "%s: 0x%lx is busy\n",
+                               __FUNCTION__, hdp->hd_phys_address);
+                       iounmap(hdp->hd_address);
+                       return -EBUSY;
+               }
 -      } else if (res->id == ACPI_RSTYPE_FIXED_MEM32) {
++      } else if (res->type == ACPI_RSTYPE_FIXED_MEM32) {
+               struct acpi_resource_fixed_mem32 *fixmem32;
+               fixmem32 = &res->data.fixed_memory32;
+               if (!fixmem32)
+                       return -EINVAL;
+               hdp->hd_phys_address = fixmem32->range_base_address;
+               hdp->hd_address = ioremap(fixmem32->range_base_address,
+                                               HPET_RANGE_SIZE);
+               if (hpet_is_known(hdp)) {
+                       printk(KERN_DEBUG "%s: 0x%lx is busy\n",
+                               __FUNCTION__, hdp->hd_phys_address);
+                       iounmap(hdp->hd_address);
+                       return -EBUSY;
+               }
 -      } else if (res->id == ACPI_RSTYPE_EXT_IRQ) {
 +      } else if (res->type == ACPI_RSTYPE_EXT_IRQ) {
                struct acpi_resource_ext_irq *irqp;
                int i;