X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=drivers%2Fthermal%2Fthermal_core.c;h=d6ebc1cf6aa9b197089a07ed074610e0124869e5;hb=5c99a8d1edb53921d79fee29231bca3ada77b5d6;hp=6ab982309e6a04cd3c933850d34aabaaf3dd60e4;hpb=ef8e0ff97ae8168ffe1558a5726a8b348c8228a3;p=linux-block.git diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 6ab982309e6a..d6ebc1cf6aa9 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -290,10 +290,12 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, int delay) { if (delay > 1000) - mod_delayed_work(system_freezable_wq, &tz->poll_queue, + mod_delayed_work(system_freezable_power_efficient_wq, + &tz->poll_queue, round_jiffies(msecs_to_jiffies(delay))); else if (delay) - mod_delayed_work(system_freezable_wq, &tz->poll_queue, + mod_delayed_work(system_freezable_power_efficient_wq, + &tz->poll_queue, msecs_to_jiffies(delay)); else cancel_delayed_work(&tz->poll_queue); @@ -1102,8 +1104,9 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) mutex_unlock(&thermal_list_lock); ida_simple_remove(&thermal_cdev_ida, cdev->id); - device_unregister(&cdev->device); + device_del(&cdev->device); thermal_cooling_device_destroy_sysfs(cdev); + put_device(&cdev->device); } EXPORT_SYMBOL_GPL(thermal_cooling_device_unregister);