aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/ec.c2
-rw-r--r--drivers/acpi/glue.c6
-rw-r--r--drivers/acpi/motherboard.c4
-rw-r--r--drivers/acpi/pci_link.c10
-rw-r--r--drivers/acpi/pci_root.c6
-rw-r--r--drivers/char/hpet.c2
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c36
7 files changed, 33 insertions, 33 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 7e1a445955bc..c33bfba5df8f 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1151,7 +1151,7 @@ acpi_ec_io_ports(struct acpi_resource *resource, void *context)
1151 union acpi_ec *ec = (union acpi_ec *)context; 1151 union acpi_ec *ec = (union acpi_ec *)context;
1152 struct acpi_generic_address *addr; 1152 struct acpi_generic_address *addr;
1153 1153
1154 if (resource->id != ACPI_RSTYPE_IO) { 1154 if (resource->type != ACPI_RSTYPE_IO) {
1155 return AE_OK; 1155 return AE_OK;
1156 } 1156 }
1157 1157
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index e36c5da2b31a..00aeb4801d7a 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -99,9 +99,9 @@ do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
99 int *busnr = (int *)data; 99 int *busnr = (int *)data;
100 struct acpi_resource_address64 address; 100 struct acpi_resource_address64 address;
101 101
102 if (resource->id != ACPI_RSTYPE_ADDRESS16 && 102 if (resource->type != ACPI_RSTYPE_ADDRESS16 &&
103 resource->id != ACPI_RSTYPE_ADDRESS32 && 103 resource->type != ACPI_RSTYPE_ADDRESS32 &&
104 resource->id != ACPI_RSTYPE_ADDRESS64) 104 resource->type != ACPI_RSTYPE_ADDRESS64)
105 return AE_OK; 105 return AE_OK;
106 106
107 acpi_resource_to_address64(resource, &address); 107 acpi_resource_to_address64(resource, &address);
diff --git a/drivers/acpi/motherboard.c b/drivers/acpi/motherboard.c
index e928e8c2c6ec..85c1fb5c9a5a 100644
--- a/drivers/acpi/motherboard.c
+++ b/drivers/acpi/motherboard.c
@@ -54,7 +54,7 @@ static acpi_status acpi_reserve_io_ranges(struct acpi_resource *res, void *data)
54 54
55 ACPI_FUNCTION_TRACE("acpi_reserve_io_ranges"); 55 ACPI_FUNCTION_TRACE("acpi_reserve_io_ranges");
56 56
57 if (res->id == ACPI_RSTYPE_IO) { 57 if (res->type == ACPI_RSTYPE_IO) {
58 struct acpi_resource_io *io_res = &res->data.io; 58 struct acpi_resource_io *io_res = &res->data.io;
59 59
60 if (io_res->min_base_address != io_res->max_base_address) 60 if (io_res->min_base_address != io_res->max_base_address)
@@ -70,7 +70,7 @@ static acpi_status acpi_reserve_io_ranges(struct acpi_resource *res, void *data)
70 request_region(io_res->min_base_address, 70 request_region(io_res->min_base_address,
71 io_res->range_length, "motherboard"); 71 io_res->range_length, "motherboard");
72 } 72 }
73 } else if (res->id == ACPI_RSTYPE_FIXED_IO) { 73 } else if (res->type == ACPI_RSTYPE_FIXED_IO) {
74 struct acpi_resource_fixed_io *fixed_io_res = 74 struct acpi_resource_fixed_io *fixed_io_res =
75 &res->data.fixed_io; 75 &res->data.fixed_io;
76 76
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 82292b77e5c6..d8956c0bf143 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -108,7 +108,7 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
108 108
109 ACPI_FUNCTION_TRACE("acpi_pci_link_check_possible"); 109 ACPI_FUNCTION_TRACE("acpi_pci_link_check_possible");
110 110
111 switch (resource->id) { 111 switch (resource->type) {
112 case ACPI_RSTYPE_START_DPF: 112 case ACPI_RSTYPE_START_DPF:
113 return_ACPI_STATUS(AE_OK); 113 return_ACPI_STATUS(AE_OK);
114 case ACPI_RSTYPE_IRQ: 114 case ACPI_RSTYPE_IRQ:
@@ -201,7 +201,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
201 201
202 ACPI_FUNCTION_TRACE("acpi_pci_link_check_current"); 202 ACPI_FUNCTION_TRACE("acpi_pci_link_check_current");
203 203
204 switch (resource->id) { 204 switch (resource->type) {
205 case ACPI_RSTYPE_IRQ: 205 case ACPI_RSTYPE_IRQ:
206 { 206 {
207 struct acpi_resource_irq *p = &resource->data.irq; 207 struct acpi_resource_irq *p = &resource->data.irq;
@@ -326,7 +326,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
326 326
327 switch (link->irq.resource_type) { 327 switch (link->irq.resource_type) {
328 case ACPI_RSTYPE_IRQ: 328 case ACPI_RSTYPE_IRQ:
329 resource->res.id = ACPI_RSTYPE_IRQ; 329 resource->res.type = ACPI_RSTYPE_IRQ;
330 resource->res.length = sizeof(struct acpi_resource); 330 resource->res.length = sizeof(struct acpi_resource);
331 resource->res.data.irq.edge_level = link->irq.edge_level; 331 resource->res.data.irq.edge_level = link->irq.edge_level;
332 resource->res.data.irq.active_high_low = 332 resource->res.data.irq.active_high_low =
@@ -341,7 +341,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
341 break; 341 break;
342 342
343 case ACPI_RSTYPE_EXT_IRQ: 343 case ACPI_RSTYPE_EXT_IRQ:
344 resource->res.id = ACPI_RSTYPE_EXT_IRQ; 344 resource->res.type = ACPI_RSTYPE_EXT_IRQ;
345 resource->res.length = sizeof(struct acpi_resource); 345 resource->res.length = sizeof(struct acpi_resource);
346 resource->res.data.extended_irq.producer_consumer = 346 resource->res.data.extended_irq.producer_consumer =
347 ACPI_CONSUMER; 347 ACPI_CONSUMER;
@@ -364,7 +364,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
364 goto end; 364 goto end;
365 365
366 } 366 }
367 resource->end.id = ACPI_RSTYPE_END_TAG; 367 resource->end.type = ACPI_RSTYPE_END_TAG;
368 368
369 /* Attempt to set the resource */ 369 /* Attempt to set the resource */
370 status = acpi_set_current_resources(link->handle, &buffer); 370 status = acpi_set_current_resources(link->handle, &buffer);
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 0fd9988c283d..5d6bc815fe72 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -122,9 +122,9 @@ get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
122 int *busnr = (int *)data; 122 int *busnr = (int *)data;
123 struct acpi_resource_address64 address; 123 struct acpi_resource_address64 address;
124 124
125 if (resource->id != ACPI_RSTYPE_ADDRESS16 && 125 if (resource->type != ACPI_RSTYPE_ADDRESS16 &&
126 resource->id != ACPI_RSTYPE_ADDRESS32 && 126 resource->type != ACPI_RSTYPE_ADDRESS32 &&
127 resource->id != ACPI_RSTYPE_ADDRESS64) 127 resource->type != ACPI_RSTYPE_ADDRESS64)
128 return AE_OK; 128 return AE_OK;
129 129
130 acpi_resource_to_address64(resource, &address); 130 acpi_resource_to_address64(resource, &address);
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index de0379b6d502..a5c3f9c0c909 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -897,7 +897,7 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
897 for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next) 897 for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
898 if (hpetp->hp_hpet == hdp->hd_address) 898 if (hpetp->hp_hpet == hdp->hd_address)
899 return -EBUSY; 899 return -EBUSY;
900 } else if (res->id == ACPI_RSTYPE_EXT_IRQ) { 900 } else if (res->type == ACPI_RSTYPE_EXT_IRQ) {
901 struct acpi_resource_ext_irq *irqp; 901 struct acpi_resource_ext_irq *irqp;
902 int i; 902 int i;
903 903
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 416d30debe6c..15ec05f69ddd 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -163,7 +163,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
163 struct pnp_resource_table * res_table = (struct pnp_resource_table *)data; 163 struct pnp_resource_table * res_table = (struct pnp_resource_table *)data;
164 int i; 164 int i;
165 165
166 switch (res->id) { 166 switch (res->type) {
167 case ACPI_RSTYPE_IRQ: 167 case ACPI_RSTYPE_IRQ:
168 /* 168 /*
169 * Per spec, only one interrupt per descriptor is allowed in 169 * Per spec, only one interrupt per descriptor is allowed in
@@ -233,7 +233,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
233 case ACPI_RSTYPE_VENDOR: 233 case ACPI_RSTYPE_VENDOR:
234 break; 234 break;
235 default: 235 default:
236 pnp_warn("PnPACPI: unknown resource type %d", res->id); 236 pnp_warn("PnPACPI: unknown resource type %d", res->type);
237 return AE_ERROR; 237 return AE_ERROR;
238 } 238 }
239 239
@@ -467,7 +467,7 @@ static acpi_status pnpacpi_option_resource(struct acpi_resource *res,
467 struct pnp_dev *dev = parse_data->dev; 467 struct pnp_dev *dev = parse_data->dev;
468 struct pnp_option *option = parse_data->option; 468 struct pnp_option *option = parse_data->option;
469 469
470 switch (res->id) { 470 switch (res->type) {
471 case ACPI_RSTYPE_IRQ: 471 case ACPI_RSTYPE_IRQ:
472 pnpacpi_parse_irq_option(option, &res->data.irq); 472 pnpacpi_parse_irq_option(option, &res->data.irq);
473 break; 473 break;
@@ -528,7 +528,7 @@ static acpi_status pnpacpi_option_resource(struct acpi_resource *res,
528 parse_data->option_independent = NULL; 528 parse_data->option_independent = NULL;
529 break; 529 break;
530 default: 530 default:
531 pnp_warn("PnPACPI: unknown resource type %d", res->id); 531 pnp_warn("PnPACPI: unknown resource type %d", res->type);
532 return AE_ERROR; 532 return AE_ERROR;
533 } 533 }
534 534
@@ -559,7 +559,7 @@ static acpi_status pnpacpi_count_resources(struct acpi_resource *res,
559 void *data) 559 void *data)
560{ 560{
561 int *res_cnt = (int *)data; 561 int *res_cnt = (int *)data;
562 switch (res->id) { 562 switch (res->type) {
563 case ACPI_RSTYPE_IRQ: 563 case ACPI_RSTYPE_IRQ:
564 case ACPI_RSTYPE_EXT_IRQ: 564 case ACPI_RSTYPE_EXT_IRQ:
565 case ACPI_RSTYPE_DMA: 565 case ACPI_RSTYPE_DMA:
@@ -584,7 +584,7 @@ static acpi_status pnpacpi_type_resources(struct acpi_resource *res,
584 void *data) 584 void *data)
585{ 585{
586 struct acpi_resource **resource = (struct acpi_resource **)data; 586 struct acpi_resource **resource = (struct acpi_resource **)data;
587 switch (res->id) { 587 switch (res->type) {
588 case ACPI_RSTYPE_IRQ: 588 case ACPI_RSTYPE_IRQ:
589 case ACPI_RSTYPE_EXT_IRQ: 589 case ACPI_RSTYPE_EXT_IRQ:
590 case ACPI_RSTYPE_DMA: 590 case ACPI_RSTYPE_DMA:
@@ -598,7 +598,7 @@ static acpi_status pnpacpi_type_resources(struct acpi_resource *res,
598 case ACPI_RSTYPE_ADDRESS32: 598 case ACPI_RSTYPE_ADDRESS32:
599 case ACPI_RSTYPE_ADDRESS64: 599 case ACPI_RSTYPE_ADDRESS64:
600#endif 600#endif
601 (*resource)->id = res->id; 601 (*resource)->type = res->type;
602 (*resource)++; 602 (*resource)++;
603 default: 603 default:
604 return AE_OK; 604 return AE_OK;
@@ -636,7 +636,7 @@ int pnpacpi_build_resource_template(acpi_handle handle,
636 return -EINVAL; 636 return -EINVAL;
637 } 637 }
638 /* resource will pointer the end resource now */ 638 /* resource will pointer the end resource now */
639 resource->id = ACPI_RSTYPE_END_TAG; 639 resource->type = ACPI_RSTYPE_END_TAG;
640 640
641 return 0; 641 return 0;
642} 642}
@@ -648,7 +648,7 @@ static void pnpacpi_encode_irq(struct acpi_resource *resource,
648 648
649 decode_irq_flags(p->flags & IORESOURCE_BITS, &edge_level, 649 decode_irq_flags(p->flags & IORESOURCE_BITS, &edge_level,
650 &active_high_low); 650 &active_high_low);
651 resource->id = ACPI_RSTYPE_IRQ; 651 resource->type = ACPI_RSTYPE_IRQ;
652 resource->length = sizeof(struct acpi_resource); 652 resource->length = sizeof(struct acpi_resource);
653 resource->data.irq.edge_level = edge_level; 653 resource->data.irq.edge_level = edge_level;
654 resource->data.irq.active_high_low = active_high_low; 654 resource->data.irq.active_high_low = active_high_low;
@@ -667,7 +667,7 @@ static void pnpacpi_encode_ext_irq(struct acpi_resource *resource,
667 667
668 decode_irq_flags(p->flags & IORESOURCE_BITS, &edge_level, 668 decode_irq_flags(p->flags & IORESOURCE_BITS, &edge_level,
669 &active_high_low); 669 &active_high_low);
670 resource->id = ACPI_RSTYPE_EXT_IRQ; 670 resource->type = ACPI_RSTYPE_EXT_IRQ;
671 resource->length = sizeof(struct acpi_resource); 671 resource->length = sizeof(struct acpi_resource);
672 resource->data.extended_irq.producer_consumer = ACPI_CONSUMER; 672 resource->data.extended_irq.producer_consumer = ACPI_CONSUMER;
673 resource->data.extended_irq.edge_level = edge_level; 673 resource->data.extended_irq.edge_level = edge_level;
@@ -683,7 +683,7 @@ static void pnpacpi_encode_ext_irq(struct acpi_resource *resource,
683static void pnpacpi_encode_dma(struct acpi_resource *resource, 683static void pnpacpi_encode_dma(struct acpi_resource *resource,
684 struct resource *p) 684 struct resource *p)
685{ 685{
686 resource->id = ACPI_RSTYPE_DMA; 686 resource->type = ACPI_RSTYPE_DMA;
687 resource->length = sizeof(struct acpi_resource); 687 resource->length = sizeof(struct acpi_resource);
688 /* Note: pnp_assign_dma will copy pnp_dma->flags into p->flags */ 688 /* Note: pnp_assign_dma will copy pnp_dma->flags into p->flags */
689 if (p->flags & IORESOURCE_DMA_COMPATIBLE) 689 if (p->flags & IORESOURCE_DMA_COMPATIBLE)
@@ -708,7 +708,7 @@ static void pnpacpi_encode_dma(struct acpi_resource *resource,
708static void pnpacpi_encode_io(struct acpi_resource *resource, 708static void pnpacpi_encode_io(struct acpi_resource *resource,
709 struct resource *p) 709 struct resource *p)
710{ 710{
711 resource->id = ACPI_RSTYPE_IO; 711 resource->type = ACPI_RSTYPE_IO;
712 resource->length = sizeof(struct acpi_resource); 712 resource->length = sizeof(struct acpi_resource);
713 /* Note: pnp_assign_port will copy pnp_port->flags into p->flags */ 713 /* Note: pnp_assign_port will copy pnp_port->flags into p->flags */
714 resource->data.io.io_decode = (p->flags & PNP_PORT_FLAG_16BITADDR)? 714 resource->data.io.io_decode = (p->flags & PNP_PORT_FLAG_16BITADDR)?
@@ -722,7 +722,7 @@ static void pnpacpi_encode_io(struct acpi_resource *resource,
722static void pnpacpi_encode_fixed_io(struct acpi_resource *resource, 722static void pnpacpi_encode_fixed_io(struct acpi_resource *resource,
723 struct resource *p) 723 struct resource *p)
724{ 724{
725 resource->id = ACPI_RSTYPE_FIXED_IO; 725 resource->type = ACPI_RSTYPE_FIXED_IO;
726 resource->length = sizeof(struct acpi_resource); 726 resource->length = sizeof(struct acpi_resource);
727 resource->data.fixed_io.base_address = p->start; 727 resource->data.fixed_io.base_address = p->start;
728 resource->data.fixed_io.range_length = p->end - p->start + 1; 728 resource->data.fixed_io.range_length = p->end - p->start + 1;
@@ -731,7 +731,7 @@ static void pnpacpi_encode_fixed_io(struct acpi_resource *resource,
731static void pnpacpi_encode_mem24(struct acpi_resource *resource, 731static void pnpacpi_encode_mem24(struct acpi_resource *resource,
732 struct resource *p) 732 struct resource *p)
733{ 733{
734 resource->id = ACPI_RSTYPE_MEM24; 734 resource->type = ACPI_RSTYPE_MEM24;
735 resource->length = sizeof(struct acpi_resource); 735 resource->length = sizeof(struct acpi_resource);
736 /* Note: pnp_assign_mem will copy pnp_mem->flags into p->flags */ 736 /* Note: pnp_assign_mem will copy pnp_mem->flags into p->flags */
737 resource->data.memory24.read_write_attribute = 737 resource->data.memory24.read_write_attribute =
@@ -746,7 +746,7 @@ static void pnpacpi_encode_mem24(struct acpi_resource *resource,
746static void pnpacpi_encode_mem32(struct acpi_resource *resource, 746static void pnpacpi_encode_mem32(struct acpi_resource *resource,
747 struct resource *p) 747 struct resource *p)
748{ 748{
749 resource->id = ACPI_RSTYPE_MEM32; 749 resource->type = ACPI_RSTYPE_MEM32;
750 resource->length = sizeof(struct acpi_resource); 750 resource->length = sizeof(struct acpi_resource);
751 resource->data.memory32.read_write_attribute = 751 resource->data.memory32.read_write_attribute =
752 (p->flags & IORESOURCE_MEM_WRITEABLE) ? 752 (p->flags & IORESOURCE_MEM_WRITEABLE) ?
@@ -760,7 +760,7 @@ static void pnpacpi_encode_mem32(struct acpi_resource *resource,
760static void pnpacpi_encode_fixed_mem32(struct acpi_resource *resource, 760static void pnpacpi_encode_fixed_mem32(struct acpi_resource *resource,
761 struct resource *p) 761 struct resource *p)
762{ 762{
763 resource->id = ACPI_RSTYPE_FIXED_MEM32; 763 resource->type = ACPI_RSTYPE_FIXED_MEM32;
764 resource->length = sizeof(struct acpi_resource); 764 resource->length = sizeof(struct acpi_resource);
765 resource->data.fixed_memory32.read_write_attribute = 765 resource->data.fixed_memory32.read_write_attribute =
766 (p->flags & IORESOURCE_MEM_WRITEABLE) ? 766 (p->flags & IORESOURCE_MEM_WRITEABLE) ?
@@ -780,7 +780,7 @@ int pnpacpi_encode_resources(struct pnp_resource_table *res_table,
780 780
781 pnp_dbg("res cnt %d", res_cnt); 781 pnp_dbg("res cnt %d", res_cnt);
782 while (i < res_cnt) { 782 while (i < res_cnt) {
783 switch(resource->id) { 783 switch(resource->type) {
784 case ACPI_RSTYPE_IRQ: 784 case ACPI_RSTYPE_IRQ:
785 pnp_dbg("Encode irq"); 785 pnp_dbg("Encode irq");
786 pnpacpi_encode_irq(resource, 786 pnpacpi_encode_irq(resource,
@@ -831,7 +831,7 @@ int pnpacpi_encode_resources(struct pnp_resource_table *res_table,
831 mem ++; 831 mem ++;
832 break; 832 break;
833 default: /* other type */ 833 default: /* other type */
834 pnp_warn("unknown resource type %d", resource->id); 834 pnp_warn("unknown resource type %d", resource->type);
835 return -EINVAL; 835 return -EINVAL;
836 } 836 }
837 resource ++; 837 resource ++;