Skip to content

Commit ad47f83

Browse files
Davidlohr Buesorafaeljw
authored andcommitted
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: Davidlohr Bueso <[email protected]> Acked-by: Zhang Rui <[email protected]> [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 9e5d3d6 commit ad47f83

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,15 @@ static int int3400_thermal_run_osc(acpi_handle handle, char *uuid_str, int *enab
169169
acpi_status status;
170170
int result = 0;
171171
struct acpi_osc_context context = {
172-
.uuid_str = NULL,
172+
.uuid_str = uuid_str,
173173
.rev = 1,
174174
.cap.length = 8,
175+
.cap.pointer = buf,
175176
};
176177

177-
context.uuid_str = uuid_str;
178-
179178
buf[OSC_QUERY_DWORD] = 0;
180179
buf[OSC_SUPPORT_DWORD] = *enable;
181180

182-
context.cap.pointer = buf;
183-
184181
status = acpi_run_osc(handle, &context);
185182
if (ACPI_SUCCESS(status)) {
186183
ret = *((u32 *)(context.ret.pointer + 4));

0 commit comments

Comments
 (0)