diff options
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r-- | drivers/pci/pci-acpi.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index bb7456c1dbac..a064f36a0805 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -36,6 +36,7 @@ acpi_query_osc ( | |||
36 | struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL}; | 36 | struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL}; |
37 | union acpi_object *out_obj; | 37 | union acpi_object *out_obj; |
38 | u32 osc_dw0; | 38 | u32 osc_dw0; |
39 | acpi_status *ret_status = (acpi_status *)retval; | ||
39 | 40 | ||
40 | 41 | ||
41 | /* Setting up input parameters */ | 42 | /* Setting up input parameters */ |
@@ -56,6 +57,7 @@ acpi_query_osc ( | |||
56 | if (ACPI_FAILURE (status)) { | 57 | if (ACPI_FAILURE (status)) { |
57 | printk(KERN_DEBUG | 58 | printk(KERN_DEBUG |
58 | "Evaluate _OSC Set fails. Status = 0x%04x\n", status); | 59 | "Evaluate _OSC Set fails. Status = 0x%04x\n", status); |
60 | *ret_status = status; | ||
59 | return status; | 61 | return status; |
60 | } | 62 | } |
61 | out_obj = output.pointer; | 63 | out_obj = output.pointer; |
@@ -90,6 +92,7 @@ acpi_query_osc ( | |||
90 | 92 | ||
91 | query_osc_out: | 93 | query_osc_out: |
92 | kfree(output.pointer); | 94 | kfree(output.pointer); |
95 | *ret_status = status; | ||
93 | return status; | 96 | return status; |
94 | } | 97 | } |
95 | 98 | ||
@@ -166,6 +169,7 @@ run_osc_out: | |||
166 | acpi_status pci_osc_support_set(u32 flags) | 169 | acpi_status pci_osc_support_set(u32 flags) |
167 | { | 170 | { |
168 | u32 temp; | 171 | u32 temp; |
172 | acpi_status retval; | ||
169 | 173 | ||
170 | if (!(flags & OSC_SUPPORT_MASKS)) { | 174 | if (!(flags & OSC_SUPPORT_MASKS)) { |
171 | return AE_TYPE; | 175 | return AE_TYPE; |
@@ -179,9 +183,13 @@ acpi_status pci_osc_support_set(u32 flags) | |||
179 | acpi_get_devices ( PCI_ROOT_HID_STRING, | 183 | acpi_get_devices ( PCI_ROOT_HID_STRING, |
180 | acpi_query_osc, | 184 | acpi_query_osc, |
181 | ctrlset_buf, | 185 | ctrlset_buf, |
182 | NULL ); | 186 | (void **) &retval ); |
183 | ctrlset_buf[OSC_QUERY_TYPE] = !OSC_QUERY_ENABLE; | 187 | ctrlset_buf[OSC_QUERY_TYPE] = !OSC_QUERY_ENABLE; |
184 | ctrlset_buf[OSC_CONTROL_TYPE] = temp; | 188 | ctrlset_buf[OSC_CONTROL_TYPE] = temp; |
189 | if (ACPI_FAILURE(retval)) { | ||
190 | /* no osc support at all */ | ||
191 | ctrlset_buf[OSC_SUPPORT_TYPE] = 0; | ||
192 | } | ||
185 | return AE_OK; | 193 | return AE_OK; |
186 | } | 194 | } |
187 | EXPORT_SYMBOL(pci_osc_support_set); | 195 | EXPORT_SYMBOL(pci_osc_support_set); |