aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c36
1 files changed, 18 insertions, 18 deletions
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 ++;