• Rafael J. Wysocki's avatar
    thermal: core: Initialize poll_queue in thermal_zone_device_init() · 33fcb595
    Rafael J. Wysocki authored
    In preparation for a subsequent change, move the initialization of the
    poll_queue delayed work from thermal_zone_device_register_with_trips()
    to thermal_zone_device_init() which is called by the former.
    
    However, because thermal_zone_device_init() is also called by
    thermal_pm_notify(), make the latter call cancel_delayed_work() on
    poll_queue before invoking the former, so as to allow the work
    item to be re-initialized safely.
    
    Also move thermal_zone_device_check() which needs to be defined
    before thermal_zone_device_init(), so the latter can pass it to the
    INIT_DELAYED_WORK() macro.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    33fcb595
thermal_core.c 41.6 KB