Merge branches 'thermal-core', 'thermal-built-it' and 'thermal-intel' into next
authorZhang Rui <rui.zhang@intel.com>
Tue, 7 May 2019 13:54:11 +0000 (21:54 +0800)
committerZhang Rui <rui.zhang@intel.com>
Tue, 7 May 2019 13:54:11 +0000 (21:54 +0800)
1  2  3 
drivers/thermal/thermal_core.c

@@@@ -266,7 -266,7 -266,7 +266,7 @@@@ static int __init thermal_register_gove
        return thermal_gov_power_allocator_register();
   }
   
- -static void thermal_unregister_governors(void)
+ +static void __init thermal_unregister_governors(void)
   {
        thermal_gov_step_wise_unregister();
        thermal_gov_fair_share_unregister();
@@@@ -941,7 -941,7 -941,7 +941,7 @@@@ static void bind_cdev(struct thermal_co
    */
   static struct thermal_cooling_device *
   __thermal_cooling_device_register(struct device_node *np,
 --                               char *type, void *devdata,
 ++                               const char *type, void *devdata,
                                  const struct thermal_cooling_device_ops *ops)
   {
        struct thermal_cooling_device *cdev;
    * ERR_PTR. Caller must check return value with IS_ERR*() helpers.
    */
   struct thermal_cooling_device *
 --thermal_cooling_device_register(char *type, void *devdata,
 ++thermal_cooling_device_register(const char *type, void *devdata,
                                const struct thermal_cooling_device_ops *ops)
   {
        return __thermal_cooling_device_register(NULL, type, devdata, ops);
@@@@ -1039,7 -1039,7 -1039,7 +1039,7 @@@@ EXPORT_SYMBOL_GPL(thermal_cooling_devic
    */
   struct thermal_cooling_device *
   thermal_of_cooling_device_register(struct device_node *np,
 --                                char *type, void *devdata,
 ++                                const char *type, void *devdata,
                                   const struct thermal_cooling_device_ops *ops)
   {
        return __thermal_cooling_device_register(np, type, devdata, ops);
@@@@ -1494,7 -1494,6 -1494,6 +1494,7 @@@@ static int thermal_pm_notify(struct not
                             unsigned long mode, void *_unused)
   {
        struct thermal_zone_device *tz;
 ++     enum thermal_device_mode tz_mode;
   
        switch (mode) {
        case PM_HIBERNATION_PREPARE:
        case PM_POST_SUSPEND:
                atomic_set(&in_suspend, 0);
                list_for_each_entry(tz, &thermal_tz_list, node) {
 ++                     tz_mode = THERMAL_DEVICE_ENABLED;
 ++                     if (tz->ops->get_mode)
 ++                             tz->ops->get_mode(tz, &tz_mode);
 ++
 ++                     if (tz_mode == THERMAL_DEVICE_DISABLED)
 ++                             continue;
 ++
                        thermal_zone_device_init(tz);
                        thermal_zone_device_update(tz,
                                                   THERMAL_EVENT_UNSPECIFIED);
@@@@ -1571,19 -1563,4 -1563,19 +1571,4 @@@@ error
        mutex_destroy(&poweroff_lock);
        return result;
   }
- -
- -static void __exit thermal_exit(void)
- -{
- -     unregister_pm_notifier(&thermal_pm_nb);
- -     of_thermal_destroy_zones();
- -     genetlink_exit();
- -     class_unregister(&thermal_class);
- -     thermal_unregister_governors();
- -     ida_destroy(&thermal_tz_ida);
- -     ida_destroy(&thermal_cdev_ida);
- -     mutex_destroy(&thermal_list_lock);
- -     mutex_destroy(&thermal_governor_lock);
- -}
- -
   fs_initcall(thermal_init);
- -module_exit(thermal_exit);