diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2014-05-20 08:59:22 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-26 19:21:44 -0400 |
commit | e6f8a4d60b905eae1a20cbb0c72c67b26b2f02fd (patch) | |
tree | 1316ffa3c42872dea2fc3659b503e5bc3d84c3c2 /drivers/acpi/thermal.c | |
parent | 72013795a73f8536d3346fa90379c987bcad0cc8 (diff) |
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>
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 11 |
1 files changed, 4 insertions, 7 deletions
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) | |||
925 | if (result) | 925 | if (result) |
926 | return result; | 926 | return result; |
927 | 927 | ||
928 | status = acpi_attach_data(tz->device->handle, | 928 | status = acpi_bus_attach_private_data(tz->device->handle, |
929 | acpi_bus_private_data_handler, | 929 | tz->thermal_zone); |
930 | tz->thermal_zone); | 930 | if (ACPI_FAILURE(status)) |
931 | if (ACPI_FAILURE(status)) { | ||
932 | pr_err(PREFIX "Error attaching device data\n"); | ||
933 | return -ENODEV; | 931 | return -ENODEV; |
934 | } | ||
935 | 932 | ||
936 | tz->tz_enabled = 1; | 933 | tz->tz_enabled = 1; |
937 | 934 | ||
@@ -946,7 +943,7 @@ static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz) | |||
946 | sysfs_remove_link(&tz->thermal_zone->device.kobj, "device"); | 943 | sysfs_remove_link(&tz->thermal_zone->device.kobj, "device"); |
947 | thermal_zone_device_unregister(tz->thermal_zone); | 944 | thermal_zone_device_unregister(tz->thermal_zone); |
948 | tz->thermal_zone = NULL; | 945 | 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); |
950 | } | 947 | } |
951 | 948 | ||
952 | 949 | ||