Skip to content

Commit e6f8a4d

Browse files
Lan Tianyurafaeljw
authored andcommitted
ACPI / thermal: Use acpi_bus_attach_private_data() to attach private data
Use acpi_bus_attach_private_data() to attach private data instead of acpi_attach_data(). Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 7201379 commit e6f8a4d

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)