• Tejun Heo's avatar
    timer: Clean up timer initializers · fc683995
    Tejun Heo authored
    Over time, timer initializers became messy with unnecessarily
    duplicated code which are inconsistently spread across timer.h and
    timer.c.
    
    This patch cleans up timer initializers.
    
    * timer.c::__init_timer() is renamed to do_init_timer().
    
    * __TIMER_INITIALIZER() added.  It takes @flags and all initializers
      are wrappers around it.
    
    * init_timer[_on_stack]_key() now take @flags.
    
    * __init_timer[_on_stack]() added.  They take @flags and all init
      macros are wrappers around them.
    
    * __setup_timer[_on_stack]() added.  It uses __init_timer() and takes
      @flags.  All setup macros are wrappers around the two.
    
    Note that this patch doesn't add missing init/setup combinations -
    e.g. init_timer_deferrable_on_stack().  Adding missing ones is
    trivial.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Link: http://lkml.kernel.org/r/1344449428-24962-4-git-send-email-tj@kernel.orgSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    fc683995
timer.c 49.2 KB