Commit ad47f834 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Rafael J. Wysocki

thermal: int340x: Clean up _OSC context init

Now that the UUID is already sanitized by the caller,
lets trivially clean up some of the context arming.
Signed-off-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
Acked-by: default avatarZhang Rui <rui.zhang@intel.com>
[ rjw: Subject edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 9e5d3d6b
...@@ -169,18 +169,15 @@ static int int3400_thermal_run_osc(acpi_handle handle, char *uuid_str, int *enab ...@@ -169,18 +169,15 @@ static int int3400_thermal_run_osc(acpi_handle handle, char *uuid_str, int *enab
acpi_status status; acpi_status status;
int result = 0; int result = 0;
struct acpi_osc_context context = { struct acpi_osc_context context = {
.uuid_str = NULL, .uuid_str = uuid_str,
.rev = 1, .rev = 1,
.cap.length = 8, .cap.length = 8,
.cap.pointer = buf,
}; };
context.uuid_str = uuid_str;
buf[OSC_QUERY_DWORD] = 0; buf[OSC_QUERY_DWORD] = 0;
buf[OSC_SUPPORT_DWORD] = *enable; buf[OSC_SUPPORT_DWORD] = *enable;
context.cap.pointer = buf;
status = acpi_run_osc(handle, &context); status = acpi_run_osc(handle, &context);
if (ACPI_SUCCESS(status)) { if (ACPI_SUCCESS(status)) {
ret = *((u32 *)(context.ret.pointer + 4)); ret = *((u32 *)(context.ret.pointer + 4));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment