diff options
author | Mario Limonciello <mario.limonciello@dell.com> | 2017-06-21 18:01:35 -0400 |
---|---|---|
committer | Darren Hart (VMware) <dvhart@infradead.org> | 2017-06-28 12:01:35 -0400 |
commit | c0e4aa78716401e8d7d5434b69bbf6596b55a936 (patch) | |
tree | 71b4f9f3d8b241a4d4f9407b4600572045d1a824 | |
parent | 20485a565de73c58d39b74501b451b40bd817195 (diff) |
platform/x86: alienware-wmi: Adjust instance of wmi_evaluate_method calls to 0
Pali recently noticed that WMI instances are zero indexed.
The only reason that these calls all worked properly is because the ASL
didn't verify the instance number.
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
-rw-r--r-- | drivers/platform/x86/alienware-wmi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c index d6b34923fb4e..9866fec78c1c 100644 --- a/drivers/platform/x86/alienware-wmi.c +++ b/drivers/platform/x86/alienware-wmi.c | |||
@@ -303,7 +303,7 @@ static int alienware_update_led(struct platform_zone *zone) | |||
303 | } | 303 | } |
304 | pr_debug("alienware-wmi: guid %s method %d\n", guid, method_id); | 304 | pr_debug("alienware-wmi: guid %s method %d\n", guid, method_id); |
305 | 305 | ||
306 | status = wmi_evaluate_method(guid, 1, method_id, &input, NULL); | 306 | status = wmi_evaluate_method(guid, 0, method_id, &input, NULL); |
307 | if (ACPI_FAILURE(status)) | 307 | if (ACPI_FAILURE(status)) |
308 | pr_err("alienware-wmi: zone set failure: %u\n", status); | 308 | pr_err("alienware-wmi: zone set failure: %u\n", status); |
309 | return ACPI_FAILURE(status); | 309 | return ACPI_FAILURE(status); |
@@ -352,7 +352,7 @@ static int wmax_brightness(int brightness) | |||
352 | }; | 352 | }; |
353 | input.length = (acpi_size) sizeof(args); | 353 | input.length = (acpi_size) sizeof(args); |
354 | input.pointer = &args; | 354 | input.pointer = &args; |
355 | status = wmi_evaluate_method(WMAX_CONTROL_GUID, 1, | 355 | status = wmi_evaluate_method(WMAX_CONTROL_GUID, 0, |
356 | WMAX_METHOD_BRIGHTNESS, &input, NULL); | 356 | WMAX_METHOD_BRIGHTNESS, &input, NULL); |
357 | if (ACPI_FAILURE(status)) | 357 | if (ACPI_FAILURE(status)) |
358 | pr_err("alienware-wmi: brightness set failure: %u\n", status); | 358 | pr_err("alienware-wmi: brightness set failure: %u\n", status); |
@@ -506,10 +506,10 @@ static acpi_status alienware_wmax_command(struct wmax_basic_args *in_args, | |||
506 | if (out_data != NULL) { | 506 | if (out_data != NULL) { |
507 | output.length = ACPI_ALLOCATE_BUFFER; | 507 | output.length = ACPI_ALLOCATE_BUFFER; |
508 | output.pointer = NULL; | 508 | output.pointer = NULL; |
509 | status = wmi_evaluate_method(WMAX_CONTROL_GUID, 1, | 509 | status = wmi_evaluate_method(WMAX_CONTROL_GUID, 0, |
510 | command, &input, &output); | 510 | command, &input, &output); |
511 | } else | 511 | } else |
512 | status = wmi_evaluate_method(WMAX_CONTROL_GUID, 1, | 512 | status = wmi_evaluate_method(WMAX_CONTROL_GUID, 0, |
513 | command, &input, NULL); | 513 | command, &input, NULL); |
514 | 514 | ||
515 | if (ACPI_SUCCESS(status) && out_data != NULL) { | 515 | if (ACPI_SUCCESS(status) && out_data != NULL) { |