Skip to content

Commit e81a0e7

Browse files
committed
Merge branch 'acpi-thermal'
* acpi-thermal: ACPI / thermal: Use acpi_bus_attach_private_data() to attach private data
2 parents d9bd449 + f70977f commit e81a0e7

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎drivers/acpi/thermal.c‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -925,13 +925,10 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
925925
if (result)
926926
return result;
927927

928-
status = acpi_attach_data(tz->device->handle,
929-
acpi_bus_private_data_handler,
930-
tz->thermal_zone);
931-
if (ACPI_FAILURE(status)) {
932-
pr_err(PREFIX "Error attaching device data\n");
928+
status = acpi_bus_attach_private_data(tz->device->handle,
929+
tz->thermal_zone);
930+
if (ACPI_FAILURE(status))
933931
return -ENODEV;
934-
}
935932

936933
tz->tz_enabled = 1;
937934

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

952949

0 commit comments

Comments
 (0)