ipmi_ssif: use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Fri, 24 Mar 2017 14:15:12 +0000 (22:15 +0800)
committerCorey Minyard <cminyard@mvista.com>
Fri, 7 Apr 2017 17:25:36 +0000 (12:25 -0500)
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_ssif.c

index 51ba67de862eb05afd9f3118e959f3e6042bf749..0b22a9be5029155265c0d648e14f1833a5ba4ada 100644 (file)
@@ -1644,9 +1644,8 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
 
        spin_lock_init(&ssif_info->lock);
        ssif_info->ssif_state = SSIF_NORMAL;
-       init_timer(&ssif_info->retry_timer);
-       ssif_info->retry_timer.data = (unsigned long) ssif_info;
-       ssif_info->retry_timer.function = retry_timeout;
+       setup_timer(&ssif_info->retry_timer, retry_timeout,
+                   (unsigned long)ssif_info);
 
        for (i = 0; i < SSIF_NUM_STATS; i++)
                atomic_set(&ssif_info->stats[i], 0);