aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/thermal.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r--drivers/acpi/thermal.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 1d8c250c3c73..56358e149b2b 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -230,7 +230,7 @@ static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
230 tz->last_temperature = tz->temperature; 230 tz->last_temperature = tz->temperature;
231 231
232 status = 232 status =
233 acpi_evaluate_integer(tz->handle, "_TMP", NULL, &tz->temperature); 233 acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tz->temperature);
234 if (ACPI_FAILURE(status)) 234 if (ACPI_FAILURE(status))
235 return -ENODEV; 235 return -ENODEV;
236 236
@@ -249,7 +249,7 @@ static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz)
249 return -EINVAL; 249 return -EINVAL;
250 250
251 status = 251 status =
252 acpi_evaluate_integer(tz->handle, "_TZP", NULL, 252 acpi_evaluate_integer(tz->device->handle, "_TZP", NULL,
253 &tz->polling_frequency); 253 &tz->polling_frequency);
254 if (ACPI_FAILURE(status)) 254 if (ACPI_FAILURE(status))
255 return -ENODEV; 255 return -ENODEV;
@@ -286,7 +286,7 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode)
286 if (!tz) 286 if (!tz)
287 return -EINVAL; 287 return -EINVAL;
288 288
289 status = acpi_get_handle(tz->handle, "_SCP", &handle); 289 status = acpi_get_handle(tz->device->handle, "_SCP", &handle);
290 if (ACPI_FAILURE(status)) { 290 if (ACPI_FAILURE(status)) {
291 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n")); 291 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n"));
292 return -ENODEV; 292 return -ENODEV;
@@ -317,7 +317,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
317 317
318 /* Critical Shutdown (required) */ 318 /* Critical Shutdown (required) */
319 319
320 status = acpi_evaluate_integer(tz->handle, "_CRT", NULL, 320 status = acpi_evaluate_integer(tz->device->handle, "_CRT", NULL,
321 &tz->trips.critical.temperature); 321 &tz->trips.critical.temperature);
322 if (ACPI_FAILURE(status)) { 322 if (ACPI_FAILURE(status)) {
323 tz->trips.critical.flags.valid = 0; 323 tz->trips.critical.flags.valid = 0;
@@ -333,7 +333,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
333 /* Critical Sleep (optional) */ 333 /* Critical Sleep (optional) */
334 334
335 status = 335 status =
336 acpi_evaluate_integer(tz->handle, "_HOT", NULL, 336 acpi_evaluate_integer(tz->device->handle, "_HOT", NULL,
337 &tz->trips.hot.temperature); 337 &tz->trips.hot.temperature);
338 if (ACPI_FAILURE(status)) { 338 if (ACPI_FAILURE(status)) {
339 tz->trips.hot.flags.valid = 0; 339 tz->trips.hot.flags.valid = 0;
@@ -347,7 +347,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
347 /* Passive: Processors (optional) */ 347 /* Passive: Processors (optional) */
348 348
349 status = 349 status =
350 acpi_evaluate_integer(tz->handle, "_PSV", NULL, 350 acpi_evaluate_integer(tz->device->handle, "_PSV", NULL,
351 &tz->trips.passive.temperature); 351 &tz->trips.passive.temperature);
352 if (ACPI_FAILURE(status)) { 352 if (ACPI_FAILURE(status)) {
353 tz->trips.passive.flags.valid = 0; 353 tz->trips.passive.flags.valid = 0;
@@ -356,25 +356,25 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
356 tz->trips.passive.flags.valid = 1; 356 tz->trips.passive.flags.valid = 1;
357 357
358 status = 358 status =
359 acpi_evaluate_integer(tz->handle, "_TC1", NULL, 359 acpi_evaluate_integer(tz->device->handle, "_TC1", NULL,
360 &tz->trips.passive.tc1); 360 &tz->trips.passive.tc1);
361 if (ACPI_FAILURE(status)) 361 if (ACPI_FAILURE(status))
362 tz->trips.passive.flags.valid = 0; 362 tz->trips.passive.flags.valid = 0;
363 363
364 status = 364 status =
365 acpi_evaluate_integer(tz->handle, "_TC2", NULL, 365 acpi_evaluate_integer(tz->device->handle, "_TC2", NULL,
366 &tz->trips.passive.tc2); 366 &tz->trips.passive.tc2);
367 if (ACPI_FAILURE(status)) 367 if (ACPI_FAILURE(status))
368 tz->trips.passive.flags.valid = 0; 368 tz->trips.passive.flags.valid = 0;
369 369
370 status = 370 status =
371 acpi_evaluate_integer(tz->handle, "_TSP", NULL, 371 acpi_evaluate_integer(tz->device->handle, "_TSP", NULL,
372 &tz->trips.passive.tsp); 372 &tz->trips.passive.tsp);
373 if (ACPI_FAILURE(status)) 373 if (ACPI_FAILURE(status))
374 tz->trips.passive.flags.valid = 0; 374 tz->trips.passive.flags.valid = 0;
375 375
376 status = 376 status =
377 acpi_evaluate_reference(tz->handle, "_PSL", NULL, 377 acpi_evaluate_reference(tz->device->handle, "_PSL", NULL,
378 &tz->trips.passive.devices); 378 &tz->trips.passive.devices);
379 if (ACPI_FAILURE(status)) 379 if (ACPI_FAILURE(status))
380 tz->trips.passive.flags.valid = 0; 380 tz->trips.passive.flags.valid = 0;
@@ -394,14 +394,14 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
394 char name[5] = { '_', 'A', 'C', ('0' + i), '\0' }; 394 char name[5] = { '_', 'A', 'C', ('0' + i), '\0' };
395 395
396 status = 396 status =
397 acpi_evaluate_integer(tz->handle, name, NULL, 397 acpi_evaluate_integer(tz->device->handle, name, NULL,
398 &tz->trips.active[i].temperature); 398 &tz->trips.active[i].temperature);
399 if (ACPI_FAILURE(status)) 399 if (ACPI_FAILURE(status))
400 break; 400 break;
401 401
402 name[2] = 'L'; 402 name[2] = 'L';
403 status = 403 status =
404 acpi_evaluate_reference(tz->handle, name, NULL, 404 acpi_evaluate_reference(tz->device->handle, name, NULL,
405 &tz->trips.active[i].devices); 405 &tz->trips.active[i].devices);
406 if (ACPI_SUCCESS(status)) { 406 if (ACPI_SUCCESS(status)) {
407 tz->trips.active[i].flags.valid = 1; 407 tz->trips.active[i].flags.valid = 1;
@@ -425,7 +425,7 @@ static int acpi_thermal_get_devices(struct acpi_thermal *tz)
425 return -EINVAL; 425 return -EINVAL;
426 426
427 status = 427 status =
428 acpi_evaluate_reference(tz->handle, "_TZD", NULL, &tz->devices); 428 acpi_evaluate_reference(tz->device->handle, "_TZD", NULL, &tz->devices);
429 if (ACPI_FAILURE(status)) 429 if (ACPI_FAILURE(status))
430 return -ENODEV; 430 return -ENODEV;
431 431
@@ -1296,7 +1296,7 @@ static int acpi_thermal_add(struct acpi_device *device)
1296 1296
1297 acpi_thermal_check(tz); 1297 acpi_thermal_check(tz);
1298 1298
1299 status = acpi_install_notify_handler(tz->handle, 1299 status = acpi_install_notify_handler(device->handle,
1300 ACPI_DEVICE_NOTIFY, 1300 ACPI_DEVICE_NOTIFY,
1301 acpi_thermal_notify, tz); 1301 acpi_thermal_notify, tz);
1302 if (ACPI_FAILURE(status)) { 1302 if (ACPI_FAILURE(status)) {
@@ -1337,7 +1337,7 @@ static int acpi_thermal_remove(struct acpi_device *device, int type)
1337 /* deferred task may reinsert timer */ 1337 /* deferred task may reinsert timer */
1338 del_timer_sync(&(tz->timer)); 1338 del_timer_sync(&(tz->timer));
1339 1339
1340 status = acpi_remove_notify_handler(tz->handle, 1340 status = acpi_remove_notify_handler(device->handle,
1341 ACPI_DEVICE_NOTIFY, 1341 ACPI_DEVICE_NOTIFY,
1342 acpi_thermal_notify); 1342 acpi_thermal_notify);
1343 1343