Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6f8a4d6 authored by Lan Tianyu's avatar Lan Tianyu Committed by Rafael J. Wysocki
Browse files

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: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarLan Tianyu <tianyu.lan@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 72013795
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -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,
	status =  acpi_bus_attach_private_data(tz->device->handle,
					       tz->thermal_zone);
	if (ACPI_FAILURE(status)) {
		pr_err(PREFIX "Error attaching device data\n");
	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);
}