Unbreak acpi_thermal driver.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33281 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -120,8 +120,10 @@ acpi_thermal_control(void* _cookie, uint32 op, void* arg, size_t len)
|
|||||||
|
|
||||||
acpi_thermal_type *att = NULL;
|
acpi_thermal_type *att = NULL;
|
||||||
|
|
||||||
size_t bufsize = sizeof(acpi_object_type);
|
uint32 integer;
|
||||||
acpi_object_type buf;
|
acpi_data buffer;
|
||||||
|
buffer.pointer = &integer;
|
||||||
|
buffer.length = sizeof(integer);
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case drvOpGetThermalType: {
|
case drvOpGetThermalType: {
|
||||||
@@ -129,16 +131,13 @@ acpi_thermal_control(void* _cookie, uint32 op, void* arg, size_t len)
|
|||||||
att = (acpi_thermal_type *)arg;
|
att = (acpi_thermal_type *)arg;
|
||||||
|
|
||||||
// Read basic temperature thresholds.
|
// Read basic temperature thresholds.
|
||||||
err = device->acpi->evaluate_method(device->acpi_cookie, "_CRT", &buf, bufsize, NULL, 0);
|
err = device->acpi->evaluate_method(device->acpi_cookie, "_CRT", NULL, &buffer);
|
||||||
att->critical_temp = buf.data.integer;
|
att->critical_temp = (err == B_OK) ? integer : 0;
|
||||||
err = device->acpi->evaluate_method(device->acpi_cookie, "_TMP", &buf, bufsize, NULL, 0);
|
err = device->acpi->evaluate_method(device->acpi_cookie, "_TMP", NULL, &buffer);
|
||||||
att->current_temp = buf.data.integer;
|
att->current_temp = (err == B_OK) ? integer : 0;
|
||||||
err = device->acpi->evaluate_method(device->acpi_cookie, "_HOT", &buf, bufsize, NULL, 0);
|
err = device->acpi->evaluate_method(device->acpi_cookie, "_HOT", NULL, &buffer);
|
||||||
if (err == B_OK) {
|
att->hot_temp = (err == B_OK) ? integer : 0;
|
||||||
att->hot_temp = buf.data.integer;
|
|
||||||
} else {
|
|
||||||
att->hot_temp = 0;
|
|
||||||
}
|
|
||||||
dprintf("acpi_thermal: GotBasicTemperatures()\n");
|
dprintf("acpi_thermal: GotBasicTemperatures()\n");
|
||||||
|
|
||||||
// Read Passive Cooling devices
|
// Read Passive Cooling devices
|
||||||
@@ -227,7 +226,6 @@ acpi_thermal_uninit_driver(void *driverCookie)
|
|||||||
static status_t
|
static status_t
|
||||||
acpi_thermal_register_child_devices(void *_cookie)
|
acpi_thermal_register_child_devices(void *_cookie)
|
||||||
{
|
{
|
||||||
status_t err;
|
|
||||||
device_node *node = _cookie;
|
device_node *node = _cookie;
|
||||||
int path_id;
|
int path_id;
|
||||||
char name[128];
|
char name[128];
|
||||||
|
|||||||
Reference in New Issue
Block a user