Thermal/int340x/int3403: Free acpi notification handler
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 23 Dec 2014 23:23:36 +0000 (15:23 -0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 24 Dec 2014 02:37:44 +0000 (10:37 +0800)
Remove acpi notification handler when zone is removed.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/int340x_thermal/int3403_thermal.c

index 479d754c3f57061e0f5af5e710588c1df185f9b0..0faf500d8a77874d7c1b6c8a1b3e1195fc9e8065 100644 (file)
@@ -301,6 +301,8 @@ static int int3403_sensor_remove(struct int3403_priv *priv)
 {
        struct int3403_sensor *obj = priv->priv;
 
+       acpi_remove_notify_handler(priv->adev->handle,
+                                  ACPI_DEVICE_NOTIFY, int3403_notify);
        thermal_zone_device_unregister(obj->tzone);
        return 0;
 }