.set_trip_temp = sys_set_trip_temp,
};
-static bool pkg_temp_thermal_platform_thermal_rate_control(void)
+static bool pkg_thermal_rate_control(void)
{
return true;
}
}
}
-static int pkg_temp_thermal_platform_thermal_notify(__u64 msr_val)
+static int pkg_thermal_notify(__u64 msr_val)
{
unsigned long flags;
int cpu = smp_processor_id();
return -ENODEV;
spin_lock_init(&pkg_work_lock);
- platform_thermal_package_notify =
- pkg_temp_thermal_platform_thermal_notify;
- platform_thermal_package_rate_control =
- pkg_temp_thermal_platform_thermal_rate_control;
cpu_notifier_register_begin();
for_each_online_cpu(i)
__register_hotcpu_notifier(&pkg_temp_thermal_notifier);
cpu_notifier_register_done();
+ platform_thermal_package_notify = pkg_thermal_notify;
+ platform_thermal_package_rate_control = pkg_thermal_rate_control;
+
pkg_temp_debugfs_init(); /* Don't care if fails */
return 0;
put_core_offline(i);
cpu_notifier_register_done();
kfree(pkg_work_scheduled);
- platform_thermal_package_notify = NULL;
- platform_thermal_package_rate_control = NULL;
-
return -ENODEV;
}
struct phy_dev_entry *phdev, *n;
int i;
+ platform_thermal_package_notify = NULL;
+ platform_thermal_package_rate_control = NULL;
+
cpu_notifier_register_begin();
__unregister_hotcpu_notifier(&pkg_temp_thermal_notifier);
mutex_lock(&phy_dev_list_mutex);
kfree(phdev);
}
mutex_unlock(&phy_dev_list_mutex);
- platform_thermal_package_notify = NULL;
- platform_thermal_package_rate_control = NULL;
for_each_online_cpu(i)
cancel_delayed_work_sync(
&per_cpu(pkg_temp_thermal_threshold_work, i));