aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/pci-acpi.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 951021838055..3f279990cd7e 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -120,7 +120,6 @@ static acpi_status acpi_query_osc(acpi_handle handle,
120 u32 level, void *context, void **retval) 120 u32 level, void *context, void **retval)
121{ 121{
122 acpi_status status; 122 acpi_status status;
123 acpi_status *ret_status = (acpi_status *)retval;
124 struct acpi_osc_data *osc_data; 123 struct acpi_osc_data *osc_data;
125 u32 flags = (unsigned long)context, support_set; 124 u32 flags = (unsigned long)context, support_set;
126 acpi_handle tmp; 125 acpi_handle tmp;
@@ -143,8 +142,6 @@ static acpi_status acpi_query_osc(acpi_handle handle,
143 osc_args.capbuf[OSC_CONTROL_TYPE] = OSC_CONTROL_MASKS; 142 osc_args.capbuf[OSC_CONTROL_TYPE] = OSC_CONTROL_MASKS;
144 143
145 status = acpi_run_osc(handle, &osc_args); 144 status = acpi_run_osc(handle, &osc_args);
146 *ret_status = status;
147
148 if (ACPI_SUCCESS(status)) { 145 if (ACPI_SUCCESS(status)) {
149 osc_data->support_set = support_set; 146 osc_data->support_set = support_set;
150 osc_data->query_result = osc_args.query_result; 147 osc_data->query_result = osc_args.query_result;
@@ -164,15 +161,11 @@ static acpi_status acpi_query_osc(acpi_handle handle,
164 **/ 161 **/
165acpi_status __pci_osc_support_set(u32 flags, const char *hid) 162acpi_status __pci_osc_support_set(u32 flags, const char *hid)
166{ 163{
167 acpi_status retval = AE_NOT_FOUND; 164 if (!(flags & OSC_SUPPORT_MASKS))
168
169 if (!(flags & OSC_SUPPORT_MASKS)) {
170 return AE_TYPE; 165 return AE_TYPE;
171 } 166
172 acpi_get_devices(hid, 167 acpi_get_devices(hid, acpi_query_osc,
173 acpi_query_osc, 168 (void *)(unsigned long)flags, NULL);
174 (void *)(unsigned long)flags,
175 (void **) &retval );
176 return AE_OK; 169 return AE_OK;
177} 170}
178 171