Skip to contentSkip to conversation

misc: sgi-xp: Use setup_timer Kernel API instead of

PATCH In review Santosh Kumar Singh 2 participants 2 messages Apr 2, 2017 – Apr 6, 2017 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: sgi-xp: Use setup_timer Kernel API instead of

Replace init_timer function with setup_timer reported by coccinelle

---
 drivers/misc/sgi-xp/xpc_main.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/misc/sgi-xp/xpc_main.c +3 -5
index 7f32712..9545157 100644
@@ -931,11 +931,8 @@ struct device xpc_chan_dbg_subname = {
 		part->act_state = XPC_P_AS_INACTIVE;
 		XPC_SET_REASON(part, 0, 0);
 
-		init_timer(&part->disengage_timer);
-		part->disengage_timer.function =
-		    xpc_timeout_partition_disengage;
-		part->disengage_timer.data = (unsigned long)part;
-
+		setup_timer(&part->disengage_timer,
+				xpc_timeout_partition_disengage,
+					(unsigned long)part);
 		part->setup_state = XPC_P_SS_UNSET;
 		init_waitqueue_head(&part->teardown_wq);

atomic_set(&part->references, 0);

Signature · 1 line
1.9.1