From: Vaishali Thakkar Date: Wed, 10 Jun 2015 05:40:05 +0000 (+0530) Subject: atm: idt77105: Use setup_timer X-Git-Tag: v4.2-rc1~130^2~99 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bae23b6840a6a15947173d8282028458dbcdeb5b;p=platform%2Fkernel%2Flinux-exynos.git atm: idt77105: Use setup_timer Use the timer API function setup_timer instead of structure field assignments to initialize a timer. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: @change@ expression e1, e2, a; @@ -init_timer(&e1); +setup_timer(&e1, a, 0UL); ... when != a = e2 -e1.function = a; Signed-off-by: Vaishali Thakkar Signed-off-by: David S. Miller --- diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c index 909c95b..feb023d 100644 --- a/drivers/atm/idt77105.c +++ b/drivers/atm/idt77105.c @@ -306,14 +306,12 @@ static int idt77105_start(struct atm_dev *dev) if (start_timer) { start_timer = 0; - init_timer(&stats_timer); + setup_timer(&stats_timer, idt77105_stats_timer_func, 0UL); stats_timer.expires = jiffies+IDT77105_STATS_TIMER_PERIOD; - stats_timer.function = idt77105_stats_timer_func; add_timer(&stats_timer); - init_timer(&restart_timer); + setup_timer(&restart_timer, idt77105_restart_timer_func, 0UL); restart_timer.expires = jiffies+IDT77105_RESTART_TIMER_PERIOD; - restart_timer.function = idt77105_restart_timer_func; add_timer(&restart_timer); } spin_unlock_irqrestore(&idt77105_priv_lock, flags);