diff mbox series

[3/3] thermal: int340x: Cleanup osc context init

Message ID 20220324190950.70486-4-dave@stgolabs.net
State Accepted
Commit ad47f8343a96cc1ebd3654a645d86c63eaeefb39
Headers show
Series thermal: int340x: Misc acpi_buffer handling updates | expand

Commit Message

Davidlohr Bueso March 24, 2022, 7:09 p.m. UTC
Now that the UUID is already sanitized by the caller,
lets trivially cleanup some of the context arming.

Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
index e299873d50b8..4c49a6c9d4df 100644
--- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
+++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
@@ -169,18 +169,15 @@  static int int3400_thermal_run_osc(acpi_handle handle, char *uuid_str, int *enab
 	acpi_status status;
 	int result = 0;
 	struct acpi_osc_context context = {
-		.uuid_str = NULL,
+		.uuid_str = uuid_str,
 		.rev = 1,
 		.cap.length = 8,
+		.cap.pointer = buf,
 	};
 
-	context.uuid_str = uuid_str;
-
 	buf[OSC_QUERY_DWORD] = 0;
 	buf[OSC_SUPPORT_DWORD] = *enable;
 
-	context.cap.pointer = buf;
-
 	status = acpi_run_osc(handle, &context);
 	if (ACPI_SUCCESS(status)) {
 		ret = *((u32 *)(context.ret.pointer + 4));