aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/osl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 34b3386dedca..15e602377655 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -623,7 +623,7 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
623 623
624acpi_status 624acpi_status
625acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, 625acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
626 void *value, u32 width) 626 u32 *value, u32 width)
627{ 627{
628 int result, size; 628 int result, size;
629 629
@@ -689,7 +689,6 @@ static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
689 acpi_status status; 689 acpi_status status;
690 unsigned long temp; 690 unsigned long temp;
691 acpi_object_type type; 691 acpi_object_type type;
692 u8 tu8;
693 692
694 acpi_get_parent(chandle, &handle); 693 acpi_get_parent(chandle, &handle);
695 if (handle != rhandle) { 694 if (handle != rhandle) {
@@ -704,6 +703,7 @@ static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
704 acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, 703 acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
705 &temp); 704 &temp);
706 if (ACPI_SUCCESS(status)) { 705 if (ACPI_SUCCESS(status)) {
706 u32 val;
707 pci_id->device = ACPI_HIWORD(ACPI_LODWORD(temp)); 707 pci_id->device = ACPI_HIWORD(ACPI_LODWORD(temp));
708 pci_id->function = ACPI_LOWORD(ACPI_LODWORD(temp)); 708 pci_id->function = ACPI_LOWORD(ACPI_LODWORD(temp));
709 709
@@ -712,24 +712,24 @@ static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
712 712
713 /* any nicer way to get bus number of bridge ? */ 713 /* any nicer way to get bus number of bridge ? */
714 status = 714 status =
715 acpi_os_read_pci_configuration(pci_id, 0x0e, &tu8, 715 acpi_os_read_pci_configuration(pci_id, 0x0e, &val,
716 8); 716 8);
717 if (ACPI_SUCCESS(status) 717 if (ACPI_SUCCESS(status)
718 && ((tu8 & 0x7f) == 1 || (tu8 & 0x7f) == 2)) { 718 && ((val & 0x7f) == 1 || (val & 0x7f) == 2)) {
719 status = 719 status =
720 acpi_os_read_pci_configuration(pci_id, 0x18, 720 acpi_os_read_pci_configuration(pci_id, 0x18,
721 &tu8, 8); 721 &val, 8);
722 if (!ACPI_SUCCESS(status)) { 722 if (!ACPI_SUCCESS(status)) {
723 /* Certainly broken... FIX ME */ 723 /* Certainly broken... FIX ME */
724 return; 724 return;
725 } 725 }
726 *is_bridge = 1; 726 *is_bridge = 1;
727 pci_id->bus = tu8; 727 pci_id->bus = val;
728 status = 728 status =
729 acpi_os_read_pci_configuration(pci_id, 0x19, 729 acpi_os_read_pci_configuration(pci_id, 0x19,
730 &tu8, 8); 730 &val, 8);
731 if (ACPI_SUCCESS(status)) { 731 if (ACPI_SUCCESS(status)) {
732 *bus_number = tu8; 732 *bus_number = val;
733 } 733 }
734 } else 734 } else
735 *is_bridge = 0; 735 *is_bridge = 0;