]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'acpi-thermal'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 3 Jun 2014 21:12:43 +0000 (23:12 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 3 Jun 2014 21:12:43 +0000 (23:12 +0200)
* acpi-thermal:
  ACPI / thermal: Use acpi_bus_attach_private_data() to attach private data

drivers/acpi/thermal.c

index 25bbc55dca896889886a1e9ed856cfb6fa71135d..112817e963e05f01ab11fe9234ef46ec56cc9886 100644 (file)
@@ -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);
 }