aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/int340x_thermal/acpi_thermal_rel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/thermal/int340x_thermal/acpi_thermal_rel.c b/drivers/thermal/int340x_thermal/acpi_thermal_rel.c
index 0d8db808f0ae..ac5c40558b84 100644
--- a/drivers/thermal/int340x_thermal/acpi_thermal_rel.c
+++ b/drivers/thermal/int340x_thermal/acpi_thermal_rel.c
@@ -317,21 +317,21 @@ static long acpi_thermal_rel_ioctl(struct file *f, unsigned int cmd,
317{ 317{
318 int ret = 0; 318 int ret = 0;
319 unsigned long length = 0; 319 unsigned long length = 0;
320 unsigned long count = 0; 320 int count = 0;
321 char __user *arg = (void __user *)__arg; 321 char __user *arg = (void __user *)__arg;
322 struct trt *trts; 322 struct trt *trts;
323 struct art *arts; 323 struct art *arts;
324 324
325 switch (cmd) { 325 switch (cmd) {
326 case ACPI_THERMAL_GET_TRT_COUNT: 326 case ACPI_THERMAL_GET_TRT_COUNT:
327 ret = acpi_parse_trt(acpi_thermal_rel_handle, (int *)&count, 327 ret = acpi_parse_trt(acpi_thermal_rel_handle, &count,
328 &trts, false); 328 &trts, false);
329 kfree(trts); 329 kfree(trts);
330 if (!ret) 330 if (!ret)
331 return put_user(count, (unsigned long __user *)__arg); 331 return put_user(count, (unsigned long __user *)__arg);
332 return ret; 332 return ret;
333 case ACPI_THERMAL_GET_TRT_LEN: 333 case ACPI_THERMAL_GET_TRT_LEN:
334 ret = acpi_parse_trt(acpi_thermal_rel_handle, (int *)&count, 334 ret = acpi_parse_trt(acpi_thermal_rel_handle, &count,
335 &trts, false); 335 &trts, false);
336 kfree(trts); 336 kfree(trts);
337 length = count * sizeof(union trt_object); 337 length = count * sizeof(union trt_object);
@@ -341,14 +341,14 @@ static long acpi_thermal_rel_ioctl(struct file *f, unsigned int cmd,
341 case ACPI_THERMAL_GET_TRT: 341 case ACPI_THERMAL_GET_TRT:
342 return fill_trt(arg); 342 return fill_trt(arg);
343 case ACPI_THERMAL_GET_ART_COUNT: 343 case ACPI_THERMAL_GET_ART_COUNT:
344 ret = acpi_parse_art(acpi_thermal_rel_handle, (int *)&count, 344 ret = acpi_parse_art(acpi_thermal_rel_handle, &count,
345 &arts, false); 345 &arts, false);
346 kfree(arts); 346 kfree(arts);
347 if (!ret) 347 if (!ret)
348 return put_user(count, (unsigned long __user *)__arg); 348 return put_user(count, (unsigned long __user *)__arg);
349 return ret; 349 return ret;
350 case ACPI_THERMAL_GET_ART_LEN: 350 case ACPI_THERMAL_GET_ART_LEN:
351 ret = acpi_parse_art(acpi_thermal_rel_handle, (int *)&count, 351 ret = acpi_parse_art(acpi_thermal_rel_handle, &count,
352 &arts, false); 352 &arts, false);
353 kfree(arts); 353 kfree(arts);
354 length = count * sizeof(union art_object); 354 length = count * sizeof(union art_object);