From: Lan Tianyu Date: Tue, 20 May 2014 12:59:22 +0000 (+0800) Subject: ACPI / thermal: Use acpi_bus_attach_private_data() to attach private data X-Git-Tag: firefly_0821_release~176^2~3768^2~5^2~4^2^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e6f8a4d60b905eae1a20cbb0c72c67b26b2f02fd;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Lan Tianyu Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index c1e31a41f949..ae195fde858d 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -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; @@ -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); }