Skip to content

Commit

Permalink
Merge branch 'acpi-thermal'
Browse files Browse the repository at this point in the history
* acpi-thermal:
  ACPI / thermal: Use acpi_bus_attach_private_data() to attach private data
  • Loading branch information
Rafael J. Wysocki committed Jun 3, 2014
2 parents d9bd449 + f70977f commit e81a0e7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,13 +925,10 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
if (result)
return result;

status = acpi_attach_data(tz->device->handle,
acpi_bus_private_data_handler,
tz->thermal_zone);
if (ACPI_FAILURE(status)) {
pr_err(PREFIX "Error attaching device data\n");
status = acpi_bus_attach_private_data(tz->device->handle,
tz->thermal_zone);
if (ACPI_FAILURE(status))
return -ENODEV;
}

tz->tz_enabled = 1;

Expand All @@ -946,7 +943,7 @@ static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz)
sysfs_remove_link(&tz->thermal_zone->device.kobj, "device");
thermal_zone_device_unregister(tz->thermal_zone);
tz->thermal_zone = NULL;
acpi_detach_data(tz->device->handle, acpi_bus_private_data_handler);
acpi_bus_detach_private_data(tz->device->handle);
}


Expand Down

0 comments on commit e81a0e7

Please sign in to comment.