aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 3808d9572619..66a2fee06eb9 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -927,9 +927,9 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
927 if (ACPI_SUCCESS(status)) { 927 if (ACPI_SUCCESS(status)) {
928 unsigned long size; 928 unsigned long size;
929 929
930 size = addr.max_address_range - addr.min_address_range + 1; 930 size = addr.maximum - addr.minimum + 1;
931 hdp->hd_phys_address = addr.min_address_range; 931 hdp->hd_phys_address = addr.minimum;
932 hdp->hd_address = ioremap(addr.min_address_range, size); 932 hdp->hd_address = ioremap(addr.minimum, size);
933 933
934 if (hpet_is_known(hdp)) { 934 if (hpet_is_known(hdp)) {
935 printk(KERN_DEBUG "%s: 0x%lx is busy\n", 935 printk(KERN_DEBUG "%s: 0x%lx is busy\n",
@@ -937,15 +937,15 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
937 iounmap(hdp->hd_address); 937 iounmap(hdp->hd_address);
938 return -EBUSY; 938 return -EBUSY;
939 } 939 }
940 } else if (res->id == ACPI_RSTYPE_FIXED_MEM32) { 940 } else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
941 struct acpi_resource_fixed_mem32 *fixmem32; 941 struct acpi_resource_fixed_memory32 *fixmem32;
942 942
943 fixmem32 = &res->data.fixed_memory32; 943 fixmem32 = &res->data.fixed_memory32;
944 if (!fixmem32) 944 if (!fixmem32)
945 return -EINVAL; 945 return -EINVAL;
946 946
947 hdp->hd_phys_address = fixmem32->range_base_address; 947 hdp->hd_phys_address = fixmem32->address;
948 hdp->hd_address = ioremap(fixmem32->range_base_address, 948 hdp->hd_address = ioremap(fixmem32->address,
949 HPET_RANGE_SIZE); 949 HPET_RANGE_SIZE);
950 950
951 if (hpet_is_known(hdp)) { 951 if (hpet_is_known(hdp)) {
@@ -954,20 +954,20 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
954 iounmap(hdp->hd_address); 954 iounmap(hdp->hd_address);
955 return -EBUSY; 955 return -EBUSY;
956 } 956 }
957 } else if (res->id == ACPI_RSTYPE_EXT_IRQ) { 957 } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {
958 struct acpi_resource_ext_irq *irqp; 958 struct acpi_resource_extended_irq *irqp;
959 int i; 959 int i;
960 960
961 irqp = &res->data.extended_irq; 961 irqp = &res->data.extended_irq;
962 962
963 if (irqp->number_of_interrupts > 0) { 963 if (irqp->interrupt_count > 0) {
964 hdp->hd_nirqs = irqp->number_of_interrupts; 964 hdp->hd_nirqs = irqp->interrupt_count;
965 965
966 for (i = 0; i < hdp->hd_nirqs; i++) { 966 for (i = 0; i < hdp->hd_nirqs; i++) {
967 int rc = 967 int rc =
968 acpi_register_gsi(irqp->interrupts[i], 968 acpi_register_gsi(irqp->interrupts[i],
969 irqp->edge_level, 969 irqp->triggering,
970 irqp->active_high_low); 970 irqp->polarity);
971 if (rc < 0) 971 if (rc < 0)
972 return AE_ERROR; 972 return AE_ERROR;
973 hdp->hd_irq[i] = rc; 973 hdp->hd_irq[i] = rc;